This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
KeyError: 'chart_generator' when i run multi-agent-collaboration.ipynb with gpt-3.5-turbo-1106 #437
Closed
4 tasks done
Checked other resources
Example Code
llm = ChatOpenAI(model="gpt-3.5-turbo-1106")
i used aboved instead of gpt4 like the one showed in the example script ,everything else is the same.
Error Message and Stack Trace (if applicable)
{'Researcher': {'messages': [AIMessage(content='I have gathered the GDP data for the UK over the past 5 years. Here are the GDP values for each year:\n\n- 2017: $2,622.43 billion\n- 2018: $2,651.38 billion\n- 2019: $2,636.29 billion\n- 2020: $2,663.99 billion\n- 2
021: $3,141.51 billion\n\nI will now proceed to create a line graph to visualize this data.', additional_kwargs={'tool_calls': [{'id': 'call_xXe0sgFx0bVlUYOKUhh8p02Q', 'function': {'arguments': '{\n "data": {\n "x": ["2017", "2018", "2019", "2020", "2021"],\n
"y": [2622.43, 2651.38, 2636.29, 2663.99, 3141.51]\n },\n "type": "line",\n "title": "UK GDP Over the Past 5 Years",\n "xLabel": "Year",\n "yLabel": "GDP (in billion USD)"\n}', 'name': 'chart_generator'}, 'type': 'function'}]}, response_metadata={'token_us
age': {'completion_tokens': 220, 'prompt_tokens': 12216, 'total_tokens': 12436}, 'model_name': 'gpt-3.5-turbo-1106', 'system_fingerprint': None, 'finish_reason': 'tool_calls', 'logprobs': None}, name='Researcher', id='run-cb9ac178-2b55-4aa4-9a14-c9adeb6582ba-0', t
ool_calls=[{'name': 'chart_generator', 'args': {'data': {'x': ['2017', '2018', '2019', '2020', '2021'], 'y': [2622.43, 2651.38, 2636.29, 2663.99, 3141.51]}, 'type': 'line', 'title': 'UK GDP Over the Past 5 Years', 'xLabel': 'Year', 'yLabel': 'GDP (in billion USD)'
output = self.tools_by_name[call["name"]].invoke(call["args"], config)
KeyError: 'chart_generator'
KeyError: 'chart_generator'
Description
it always failed the halfway,whichi is really annoying
System Info
langchainhub 0.1.15
langchain 0.1.17
langchain-text-splitters 0.0.1
langchain-openai 0.1.1
langchain-experimental 0.0.58
langchain-core 0.1.52
langchain-community 0.0.37
The text was updated successfully, but these errors were encountered: