We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
param==2.1.0 langchain-openai==0.1.9
The following errors out when setting the default instantiation of a ChatOpenAI object on a parameter:
import param from langchain_openai import ChatOpenAI class TestClass(param.Parameterized): model = param.ClassSelector(class_=ChatOpenAI, default=ChatOpenAI()) TestClass()
This is likely because ChatOpenAI is meant to handle concurrency.
ChatOpenAI
I am able to work around this by instantiating the model in the init:
import param from langchain_openai import ChatOpenAI class TestClass(param.Parameterized): model = param.ClassSelector(class_=ChatOpenAI, default=None) def __init__(self, **params): super().__init__(**params) self.model = ChatOpenAI() TestClass()
This isn't an ideal solution, as it feels like a hacky workaround and adds overhead to the codebase.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ALL software version info
param==2.1.0
langchain-openai==0.1.9
Description of expected behavior and the observed behavior
The following errors out when setting the default instantiation of a ChatOpenAI object on a parameter:
This is likely because
ChatOpenAI
is meant to handle concurrency.I am able to work around this by instantiating the model in the init:
This isn't an ideal solution, as it feels like a hacky workaround and adds overhead to the codebase.
The text was updated successfully, but these errors were encountered: