117 lines
4.9 KiB
Text
117 lines
4.9 KiB
Text
---
|
||
title: Ask AI Errors Reference
|
||
---
|
||
|
||
These error codes correspond to issues encountered when using Ask AI. Each code includes a short description and possible resolutions.
|
||
|
||
## General API errors
|
||
|
||
These error codes represent issues at the HTTP or service level, independent of the AI stream. They cover authentication, routing, rate limiting, and server errors.
|
||
|
||
---
|
||
|
||
### AI-201 - Bad input {#ai-201}
|
||
|
||
The request included data that could not be used to find a resource, or the data was malformed.
|
||
|
||
> **Solution:** Make sure you are setting the correct configuration options for [DocSearch][1] or [SiteSearch][2], and that you are passing the correct [request body][3] in your API call.
|
||
|
||
### AI-202 - Unauthorized {#ai-202}
|
||
|
||
There was an issue validating the authentication token for the request.
|
||
|
||
> **Solution**: Ensure that you are including a valid authentication token in your request headers and that it has not expired.
|
||
|
||
### AI-203 - Forbidden {#ai-203}
|
||
|
||
Access to the requested resource is unavailable or forbidden for this requester.
|
||
|
||
> **Solution**: Verify that your domain is [whitelisted][4], that you are using the correct assistantId, and that your account has the necessary permissions for this resource.
|
||
|
||
### AI-204 - HTTP error {#ai-204}
|
||
|
||
There was an issue with HTTP routing or endpoint configuration. This may indicate a problem with the target URL, proxy setup, or request path.
|
||
|
||
> **Solution**: Double-check that the API endpoint is correct and that your network or proxy configuration allows outbound connections.
|
||
|
||
### AI-205 - Too many attempts {#ai-205}
|
||
|
||
Too many requests were made within the designated time window. Your requests are being rate-limited.
|
||
|
||
> **Solution**: Wait for the rate limit window to reset before sending additional requests.
|
||
|
||
### AI-206 - Unknown {#ai-206}
|
||
|
||
An unknown error occurred.
|
||
|
||
> **Solution**: Retry the request. If the issue persists, contact support with the full request and response details.
|
||
|
||
### AI-207 - Internal error {#ai-207}
|
||
|
||
An internal error occurred within the Ask AI service.
|
||
|
||
> **Solution**: Retry your request later. If the problem continues, contact support with the error ID or timestamp.
|
||
|
||
## Ask AI chat errors
|
||
|
||
These error codes represent issues with the AI stream or upstream LLM providers.
|
||
|
||
---
|
||
|
||
### AI-208 - Provider API call error {#ai-208}
|
||
|
||
There was an issue communicating with the upstream provider’s API. This can occur when the provider returns an unexpected response or a timeout.
|
||
|
||
> **Solution:** Check the provider's API status page(s) to see if they are experiencing any ongoing issues.
|
||
|
||
### AI-209 - Provider retry error {#ai-209}
|
||
|
||
There were too many failed attempts at communicating with the upstream provider. This could be caused by issues on the provider's end, an invalid API key, or a network issue causing repeated retries.
|
||
|
||
> **Solution:** Check the provider's API status page(s) to see if they are experiencing any ongoing issues.
|
||
|
||
### AI-210 - No tool available {#ai-210}
|
||
|
||
The AI runtime could not call the requested tool. This usually means the tool name referenced in your request does not exist or was not registered in the SDK configuration.
|
||
|
||
> **Solution:** Be sure not to ask for any specific tool calls within your custom prompt. Ask AI has specific tools it uses to give the best results.
|
||
|
||
### AI-211 - Stream error {#ai-211}
|
||
|
||
A general error occurred while streaming data from the upstream provider. This could include connection interruptions, malformed data, or provider-side streaming issues.
|
||
|
||
### AI-212 - Invalid API key {#ai-212}
|
||
|
||
The upstream provider reported that there was an issue with the supplied API key.
|
||
|
||
> **Solution:** Make sure to double-check that you are using the correct API key for your assistant, and that it has the correct permissions.
|
||
|
||
### AI-213 - Billing error {#ai-213}
|
||
|
||
The upstream provider could not process the request due to a billing or quota issue.
|
||
|
||
> **Solution:** You will need to log in to your provider’s dashboard to remedy this issue.
|
||
|
||
### AI-214 - No existing model {#ai-214}
|
||
|
||
The selected model does not exist for the chosen provider.
|
||
|
||
> **Solution**: Make sure the model exists for the selected provider. A list of supported models and providers can be found in our [docs][5].
|
||
|
||
### AI-215 - No existing provider {#ai-215}
|
||
|
||
The selected provider does not exist.
|
||
|
||
> **Solution**: Make sure the provider is supported. A list of available providers and their compatible models can be found in our [docs][5].
|
||
|
||
### AI-216 - Could not load API Key {#ai-216}
|
||
|
||
This error occurs when the SDK could not load the provider’s API key successfully.
|
||
|
||
> **Solution**: Ensure the API key for the chosen LLM provider is correct and has all of the correct permissions added to it.
|
||
|
||
[1]: /docs/api#askai
|
||
[2]: https://sitesearch.algolia.com/docs/experiences/search-askai#configuration
|
||
[3]: https://www.algolia.com/doc/guides/algolia-ai/askai/reference/api
|
||
[4]: /docs/v4/askai-whitelisted-domains
|
||
[5]: https://www.algolia.com/doc/guides/algolia-ai/askai/guides/models
|