Skip to content
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

Some Exceptions on the Process Agent #12

Open
steviechen opened this issue Dec 30, 2024 · 1 comment
Open

Some Exceptions on the Process Agent #12

steviechen opened this issue Dec 30, 2024 · 1 comment

Comments

@steviechen
Copy link

Hi this Multiagent Case is kinda State Of The Art thing, I really like it.
However, I got the exceptions below while I execute the Process Agent on the step 2:

Error occurred while processing agent process_agent: Could not parse function call: 'function_call'
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/OUTPUT_PARSING_FAILURE 
Traceback (most recent call last):
  File "/Users/steviechen/opt/anaconda3/envs/llm/lib/python3.11/site-packages/langchain_core/output_parsers/openai_functions.py", line 97, in parse_result
    function_call = message.additional_kwargs["function_call"]
                    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'function_call'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "[/Users/steviechen/PycharmProjects/AI-Data-Analysis-MultiAgent/core/node.py", line 21](http://localhost:8888/lab/tree/AI-Data-Analysis-MultiAgent/AI-Data-Analysis-MultiAgent/core/node.py#line=20), in agent_node
    result = agent.invoke(state)
             ^^^^^^^^^^^^^^^^^^^
  File "/Users/steviechen/opt/anaconda3/envs/llm/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 3024, in invoke
    input = context.run(step.invoke, input, config)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[/Users/steviechen/opt/anaconda3/envs/llm/lib/python3.11/site-packages/langchain_core/output_parsers/base.py", line 193](http://localhost:8888/Users/steviechen/opt/anaconda3/envs/llm/lib/python3.11/site-packages/langchain_core/output_parsers/base.py#line=192), in invoke
    return self._call_with_config(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/steviechen/opt/anaconda3/envs/llm/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 1927, in _call_with_config
    context.run(
  File "[/Users/steviechen/opt/anaconda3/envs/llm/lib/python3.11/site-packages/langchain_core/runnables/config.py", line 396](http://localhost:8888/Users/steviechen/opt/anaconda3/envs/llm/lib/python3.11/site-packages/langchain_core/runnables/config.py#line=395), in call_func_with_variable_args
    return func(input, **kwargs)  # type: ignore[call-arg]
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/steviechen/opt/anaconda3/envs/llm/lib/python3.11/site-packages/langchain_core/output_parsers/base.py", line 194, in <lambda>
    lambda inner_input: self.parse_result(
                        ^^^^^^^^^^^^^^^^^^
  File "[/Users/steviechen/opt/anaconda3/envs/llm/lib/python3.11/site-packages/langchain_core/output_parsers/openai_functions.py", line 103](http://localhost:8888/Users/steviechen/opt/anaconda3/envs/llm/lib/python3.11/site-packages/langchain_core/output_parsers/openai_functions.py#line=102), in parse_result
    raise OutputParserException(msg) from exc
langchain_core.exceptions.OutputParserException: Could not parse function call: 'function_call'
For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/OUTPUT_PARSING_FAILURE 
Invalid or empty process decision: . Defaulting to 'Process'.

I actually got pip installed by the requirement file.

@starpig1129
Copy link
Owner

Do you have this error every time you use it?
Because LLM may have an unconventional structure, this error causes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants