Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
7.03k stars 924 forks source link

Issues with Literal AI API for thread #918

Open chibexme opened 6 months ago

chibexme commented 6 months ago

Am testing using Literal AI to persist chat history but I encountered error with thread.

Failed to list threads: [{'message': 'Unknown type "ThreadFiltersInput". Did you mean "ThreadsOrderByInput" or "ThreadPayloadInput"?', 'locations': [{'line': 6, 'column': 23}]}] ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi result = await app( # type: ignore[func-returns-value] File "/usr/local/lib/python3.8/dist-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__ return await self.app(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/fastapi/applications.py", line 1054, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/applications.py", line 116, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 186, in __call__ raise exc File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/errors.py", line 164, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/cors.py", line 91, in __call__ await self.simple_response(scope, receive, send, request_headers=headers) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/cors.py", line 146, in simple_response await self.app(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/middleware/exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/_exception_handler.py", line 55, in wrapped_app raise exc File "/usr/local/lib/python3.8/dist-packages/starlette/_exception_handler.py", line 44, in wrapped_app await app(scope, receive, sender) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 746, in __call__ await route.handle(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 75, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/usr/local/lib/python3.8/dist-packages/starlette/_exception_handler.py", line 55, in wrapped_app raise exc File "/usr/local/lib/python3.8/dist-packages/starlette/_exception_handler.py", line 44, in wrapped_app await app(scope, receive, sender) File "/usr/local/lib/python3.8/dist-packages/starlette/routing.py", line 70, in app response = await func(request) File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 278, in app raw_response = await run_endpoint_function( File "/usr/local/lib/python3.8/dist-packages/fastapi/routing.py", line 191, in run_endpoint_function return await dependant.call(**values) File "/usr/local/lib/python3.8/dist-packages/chainlit/server.py", line 565, in get_user_threads res = await data_layer.list_threads(payload.pagination, payload.filter) File "/usr/local/lib/python3.8/dist-packages/chainlit/data/__init__.py", line 365, in list_threads return await self.client.api.list_threads( File "/usr/local/lib/python3.8/dist-packages/literalai/api.py", line 466, in list_threads result = await self.make_api_call("list threads", query, variables) File "/usr/local/lib/python3.8/dist-packages/literalai/api.py", line 251, in make_api_call raise_error(json["errors"]) File "/usr/local/lib/python3.8/dist-packages/literalai/api.py", line 235, in raise_error raise Exception(error) Exception: [{'message': 'Unknown type "ThreadFiltersInput". Did you mean "ThreadsOrderByInput" or "ThreadPayloadInput"?', 'locations': [{'line': 6, 'column': 23}]}]

EsraaMadi commented 6 months ago

I have the same problem

dokterbob commented 1 month ago

Is anyone still seeing this error?

dokterbob commented 1 month ago

This might be a dup of this one: #1275

@chibexme I'd appreciate a little formatting love on the blob in your original bug report. Please? 🙏🏼 🥺