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.6k stars 347 forks source link

Backend TypeError Error #272

Closed timuryung closed 1 year ago

timuryung commented 1 year ago

Description

INFO: 127.0.0.1:50158 - "GET /api/agent/TestAgent2 HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "/Users/timur/Library/Python/3.9/lib/python/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi result = await app( # type: ignore[func-returns-value] File "/Users/timur/Library/Python/3.9/lib/python/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call return await self.app(scope, receive, send) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/fastapi/applications.py", line 276, in call await super().call(scope, receive, send) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/starlette/applications.py", line 122, in call await self.middleware_stack(scope, receive, send) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/starlette/middleware/errors.py", line 184, in call raise exc File "/Users/timur/Library/Python/3.9/lib/python/site-packages/starlette/middleware/errors.py", line 162, in call await self.app(scope, receive, _send) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/starlette/middleware/cors.py", line 92, in call await self.simple_response(scope, receive, send, request_headers=headers) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/starlette/middleware/cors.py", line 147, in simple_response await self.app(scope, receive, send) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/starlette/middleware/exceptions.py", line 79, in call raise exc File "/Users/timur/Library/Python/3.9/lib/python/site-packages/starlette/middleware/exceptions.py", line 68, in call await self.app(scope, receive, sender) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call raise e File "/Users/timur/Library/Python/3.9/lib/python/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call await self.app(scope, receive, send) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/starlette/routing.py", line 718, in call await route.handle(scope, receive, send) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/starlette/routing.py", line 276, in handle await self.app(scope, receive, send) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/starlette/routing.py", line 66, in app response = await func(request) File "/Users/timur/Library/Python/3.9/lib/python/site-packages/fastapi/routing.py", line 237, in app raw_response = await run_endpoint_function( File "/Users/timur/Library/Python/3.9/lib/python/site-packages/fastapi/routing.py", line 163, in run_endpoint_function return await dependant.call(values) File "/Users/timur/Agent-LLM/app.py", line 162, in get_agent_config agent_config = Agent(agent_name).get_agent_config() File "/Users/timur/Agent-LLM/Config/Agent.py", line 28, in init self.PROVIDER = Provider(self.AI_PROVIDER, self.PROVIDER_SETTINGS) File "/Users/timur/Agent-LLM/provider/init.py", line 24, in init self.instance = provider_class(**kwargs) File "/Users/timur/Agent-LLM/provider/huggingchat.py", line 19, in init if MAX_TOKENS <= self.MAX_TOKENS_CEILING TypeError: '<=' not supported between instances of 'str' and 'int'

Steps to Reproduce the Bug

  1. Start frond and back ends
  2. Create agent
  3. Select 'huggingchat' as AI provider
  4. Set max tokens and AI temperature

Expected Behavior

Settings saved correctly

Actual Behavior

TypeError thrown

Additional Context / Screenshots

No response

Operating System

Python Version

Environment Type - Connection

Environment Type - Container

Acknowledgements

Josh-XT commented 1 year ago

Should be fixed in #274