Create Langchain LLM converter to quickly supply it to Langchain's chain (#102)
* Create Langchain LLM converter to quickly supply it to Langchain's chain * Clean up
This commit is contained in:
committed by
GitHub
parent
da0ac1d69f
commit
0e30dcbb06
@@ -189,7 +189,7 @@ def test_react_agent_langchain(openai_completion, llm, mock_google_search):
|
||||
langchain_plugins = [tool.to_langchain_format() for tool in plugins]
|
||||
agent = initialize_agent(
|
||||
langchain_plugins,
|
||||
llm._obj,
|
||||
llm.to_langchain_format(),
|
||||
agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
|
||||
verbose=True,
|
||||
)
|
||||
|
@@ -48,7 +48,7 @@ def test_azureopenai_model(openai_completion):
|
||||
temperature=0,
|
||||
)
|
||||
assert isinstance(
|
||||
model._obj, AzureChatOpenAILC
|
||||
model.to_langchain_format(), AzureChatOpenAILC
|
||||
), "Agent not wrapped in Langchain's AzureChatOpenAI"
|
||||
|
||||
# test for str input - stream mode
|
||||
|
@@ -41,7 +41,7 @@ def test_azureopenai_model(openai_completion):
|
||||
request_timeout=60,
|
||||
)
|
||||
assert isinstance(
|
||||
model._obj, AzureOpenAILC
|
||||
model.to_langchain_format(), AzureOpenAILC
|
||||
), "Agent not wrapped in Langchain's AzureOpenAI"
|
||||
|
||||
output = model("hello world")
|
||||
@@ -64,7 +64,7 @@ def test_openai_model(openai_completion):
|
||||
request_timeout=60,
|
||||
)
|
||||
assert isinstance(
|
||||
model._obj, OpenAILC
|
||||
model.to_langchain_format(), OpenAILC
|
||||
), "Agent is not wrapped in Langchain's OpenAI"
|
||||
|
||||
output = model("hello world")
|
||||
|
Reference in New Issue
Block a user