fix: loading agent correctly and added correct chat models loading
This commit is contained in:
parent
f38c02decc
commit
58652f7c2b
9 changed files with 35 additions and 16 deletions
|
|
@ -267,7 +267,7 @@
|
|||
"y": 514.9920887988924
|
||||
},
|
||||
"data": {
|
||||
"type": "OpenAIChat",
|
||||
"type": "ChatOpenAI",
|
||||
"node": {
|
||||
"template": {
|
||||
"cache": {
|
||||
|
|
@ -365,7 +365,7 @@
|
|||
"type": "bool",
|
||||
"list": false
|
||||
},
|
||||
"_type": "OpenAIChat"
|
||||
"_type": "ChatOpenAI"
|
||||
},
|
||||
"description": "Wrapper around OpenAI Chat large language models.To use, you should have the ``openai`` python package installed, and theenvironment variable ``OPENAI_API_KEY`` set with your API key.Any parameters that are valid to be passed to the openai.create call can be passedin, even if not explicitly saved on this class.",
|
||||
"base_classes": [
|
||||
|
|
@ -423,7 +423,7 @@
|
|||
},
|
||||
{
|
||||
"source": "dndnode_36",
|
||||
"sourceHandle": "OpenAIChat|dndnode_36|BaseLanguageModel|BaseLLM",
|
||||
"sourceHandle": "ChatOpenAI|dndnode_36|BaseLanguageModel|BaseLLM",
|
||||
"target": "dndnode_33",
|
||||
"targetHandle": "BaseLanguageModel|llm|dndnode_33",
|
||||
"className": "animate-pulse",
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ def test_format_dict():
|
|||
}
|
||||
assert format_dict(input_dict) == expected_output
|
||||
|
||||
# Test 7: Check class name-specific cases (OpenAI, OpenAIChat)
|
||||
# Test 7: Check class name-specific cases (OpenAI, ChatOpenAI)
|
||||
input_dict = {
|
||||
"model_name": {"type": "str", "required": False},
|
||||
}
|
||||
|
|
@ -237,7 +237,7 @@ def test_format_dict():
|
|||
},
|
||||
}
|
||||
assert format_dict(input_dict, "OpenAI") == expected_output_openai
|
||||
assert format_dict(input_dict, "OpenAIChat") == expected_output_openai_chat
|
||||
assert format_dict(input_dict, "ChatOpenAI") == expected_output_openai_chat
|
||||
|
||||
# Test 8: Replace dict type with str
|
||||
input_dict = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue