langchain-perplexaty's Issues
Runtime error
I followed through the youtube tutorial, while the Langsmith traces show no errors and reflects an expected output, there is no output in the playground after I hit "start" in a local run. The following is the stack trace of the error generated in the langchain cli:
INFO: 127.0.0.1:55788 - "POST /search/stream_log HTTP/1.1" 200 OK
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 404, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 1106, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/usr/local/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call
raise e
File "/usr/local/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/starlette/routing.py", line 69, in app
await response(scope, receive, send)
File "/usr/local/lib/python3.9/site-packages/sse_starlette/sse.py", line 269, in call
await wrap(partial(self.listen_for_disconnect, receive))
File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 597, in aexit
raise exceptions[0]
File "/usr/local/lib/python3.9/site-packages/sse_starlette/sse.py", line 258, in wrap
await func()
File "/usr/local/lib/python3.9/site-packages/sse_starlette/sse.py", line 245, in stream_response
async for data in self.body_iterator:
File "/usr/local/lib/python3.9/site-packages/langserve/api_handler.py", line 1032, in _stream_log
raise AssertionError(
AssertionError: Expected a RunLog instance got <class 'langchain_core.tracers.log_stream.RunLogPatch'>
Consuming route from other application
Hey! I've done the walk through , thanks for such detail and easy-to-follow explanation, kudos to @efriis ๐
I have replicated the chain + serving it with langserve. I'd need to consume this endpoint , served with langserve, from an external app. The server is working properly, I'm able to consume /playground from my web browser, but I can't consume /invoke using postman or client app.
I've tried to follow langserve docs on the client side, but I'm facing some errors
Client code
import requests
response = requests.post(
"http://localhost:8000/search/invoke",
json={'input': {'topic': 'cats'}}
)
response.json()
Error:
{'detail': [{'loc': ['__root__'],
'msg': 'str type expected',
'type': 'type_error.str'}]}
Am I missing something? Should I use other client approach? I'd appreciate any further docs / reading.
Thanks again ๐
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.