-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
langchain error on Ubuntu 20.04 (python 3.9) #2
Comments
Package Version aiohttp 3.8.4 |
Can reproduce with LangChain 0.0.137 and 0.0.149 (latest). Looks like a bug with chain serialization, since demos work if we do not make the _chain_type property abstract (e.g. by just changing this line to cc @hwchase17 |
This keeps happening. |
Just to confirm, are you using the main branch from GitHub or the package from PyPI (we haven't yet pushed the fix; we'll push a new version at the end of the month)? |
Using the pypi package, not the main branch. Will try the main branch and see how it goes. |
Hello, did it work? |
Adds some documentation changes and changes to PII interface
Traceback (most recent call last):
File "/home/lightonh/NeMo-Guardrails/examples/demo_chain_as_action.py", line 76, in
demo()
File "/home/lightonh/NeMo-Guardrails/examples/demo_chain_as_action.py", line 71, in demo
result = app.generate(messages=history)
File "/home/lightonh/NeMo-Guardrails/nemoguardrails/rails/llm/llmrails.py", line 162, in generate
return asyncio.run(self.generate_async(prompt=prompt, messages=messages))
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/home/lightonh/NeMo-Guardrails/nemoguardrails/rails/llm/llmrails.py", line 121, in generate_async
new_events = await self.runtime.generate_events(events)
File "/home/lightonh/NeMo-Guardrails/nemoguardrails/flows/runtime.py", line 144, in generate_events
next_events = await self._process_start_action(events)
File "/home/lightonh/NeMo-Guardrails/nemoguardrails/flows/runtime.py", line 251, in _process_start_action
parameters = inspect.signature(fn).parameters
File "/usr/lib/python3.9/inspect.py", line 3113, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
File "/usr/lib/python3.9/inspect.py", line 2862, in from_callable
return _signature_from_callable(obj, sigcls=cls,
File "/usr/lib/python3.9/inspect.py", line 2328, in _signature_from_callable
if _signature_is_builtin(obj):
File "/usr/lib/python3.9/inspect.py", line 1875, in _signature_is_builtin
obj in (type, object))
File "pydantic/main.py", line 911, in pydantic.main.BaseModel.eq
File "/home/lightonh/.virtualenvs/NeMo-Guardrails/lib/python3.9/site-packages/langchain/chains/base.py", line 249, in dict
_dict["_type"] = self._chain_type
File "/home/lightonh/.virtualenvs/NeMo-Guardrails/lib/python3.9/site-packages/langchain/chains/base.py", line 38, in _chain_type
raise NotImplementedError("Saving not supported for this chain type.")
NotImplementedError: Saving not supported for this chain type.
The text was updated successfully, but these errors were encountered: