Josh-XT / AGiXT

AGiXT is a dynamic AI Agent Automation Platform that seamlessly orchestrates instruction management and complex task execution across diverse AI providers. Combining adaptive memory, smart features, and a versatile plugin system, AGiXT delivers efficient and comprehensive AI solutions.
https://AGiXT.com
MIT License
2.64k stars 354 forks source link

HuggingChat Error #169

Closed timuryung closed 1 year ago

timuryung commented 1 year ago

Description

With new version it says that it cannot deserialize json body Status code: 422 Response content: b'Failed to deserialize the JSON body into the target type: parameters.max_new_tokens: invalid value: integer -1380, expected u32 at line 1 column 4229' Exception in thread Thread-2 (run_task): Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/Users/timur/Downloads/Agent-LLM-1.0.17-alpha/AgentLLM.py", line 330, in run_task result = self.execution_agent(task["task_name"], task["task_id"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/timur/Downloads/Agent-LLM-1.0.17-alpha/AgentLLM.py", line 313, in execution_agent return self.run(prompt) ^^^^^^^^^^^^^^^^ File "/Users/timur/Downloads/Agent-LLM-1.0.17-alpha/AgentLLM.py", line 119, in run self.response = self.instruct(prompt) ^^^^^^^^^^^^^^^^^^^^^ File "/Users/timur/Downloads/Agent-LLM-1.0.17-alpha/provider/huggingchat.py", line 44, in instruct raise Exception("Failed to send prompt to AI") Exception: Failed to send prompt to AI

.env file AI_PROVIDER=huggingchat AI_MODEL=openassistant AI_TEMPERATURE=0.2 MAX_TOKENS=2048

Steps to Reproduce the Bug

Create .env file with huggingface as AI provider Start backend Start frontend Set agent objective

Expected Behavior

Start the task execution

Actual Behavior

Gives "Failed to send message" error

Additional Context / Screenshots

No response

Operating System

Python Version

Environment Type - Connection

Environment Type - Container

Acknowledgements

Josh-XT commented 1 year ago

Please pull latest, just fixed and tested this.

timuryung commented 1 year ago

Thank you very much. Will test when reach home.