You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using the application created with npx create-llama@latest --pro with FastAPI, frontend, and Pinecone integration, we encountered multiple errors affecting both frontend JSON parsing and backend API connections.
Frontend Error
An unhandled runtime error occurs in the frontend when the application attempts to parse an error message that is not valid JSON.
Error Message:
Unhandled Runtime Error
SyntaxError: Unexpected token 'e', "network error" is not valid JSON
In addition, a backend error occurs, likely due to connectivity issues when making requests to the OpenAI API, resulting in an APIConnectionError.
Backend Error Traceback:
return await self._retry_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\AppData\Local\pypoetry\Cache\virtualenvs\app-EUVYEV_Q-py3.11\Lib\site-packages\openai\_base_client.py", line 1596, in _request
return await self._retry_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\AppData\Local\pypoetry\Cache\virtualenvs\app-EUVYEV_Q-py3.11\Lib\site-packages\openai\_base_client.py", line 1606, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.
Steps to Reproduce
Use the npx create-llama@latest --pro template with FastAPI backend and frontend.
Set up Pinecone for vector storage.
Trigger the frontend error by causing a network issue.
Observe the frontend JSON parsing error and backend connection error.
Expected Behavior
Frontend: The application should handle invalid JSON in error messages gracefully without throwing a SyntaxError.
Backend: The application should handle connection issues with the OpenAI API, ideally with a retry mechanism or more informative error handling.
Environment
App Version: (Insert app version here)
Frameworks & Integrations: npx create-llama@latest --pro, FastAPI, Pinecone, OpenAI API
Browser: (Specify browser and version)
Operating System: (Specify OS and version)
The text was updated successfully, but these errors were encountered:
klei30
changed the title
ImportError: Cannot import name 'default_transformations' from 'llama_index.core.ingestion.api_utils'
Unhandled Runtime Error - SyntaxError: Unexpected token 'e', "network error" is not valid JSON
Nov 14, 2024
marcusschiesser
changed the title
Unhandled Runtime Error - SyntaxError: Unexpected token 'e', "network error" is not valid JSON
Handle errors that occur while streaming (NextJS and Python)
Nov 18, 2024
Description
While using the application created with
npx create-llama@latest --pro
with FastAPI, frontend, and Pinecone integration, we encountered multiple errors affecting both frontend JSON parsing and backend API connections.Frontend Error
An unhandled runtime error occurs in the frontend when the application attempts to parse an error message that is not valid JSON.
Error Message:
Source:
Backend Error
In addition, a backend error occurs, likely due to connectivity issues when making requests to the OpenAI API, resulting in an
APIConnectionError
.Backend Error Traceback:
Steps to Reproduce
npx create-llama@latest --pro
template with FastAPI backend and frontend.Expected Behavior
SyntaxError
.Environment
npx create-llama@latest --pro
, FastAPI, Pinecone, OpenAI APIThe text was updated successfully, but these errors were encountered: