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

TypeError: '>' not supported between instances of 'str' and 'int' #1030

Closed
7 of 17 tasks
dog3-l0ver opened this issue Oct 4, 2023 · 0 comments · Fixed by #1031
Closed
7 of 17 tasks

TypeError: '>' not supported between instances of 'str' and 'int' #1030

dog3-l0ver opened this issue Oct 4, 2023 · 0 comments · Fixed by #1031
Labels
needs triage Needs labels assigned. type | report | bug Confirmed bug in source code.

Comments

@dog3-l0ver
Copy link

Description

Trying to use Websearch in any mode gives me this error. I've tried to correct the offending line to int(websearch_depth), but it didn't seem to have any effect. Here's the console output:

INFO:     172.18.0.1:57834 - "POST /api/agent/Vicuna/prompt HTTP/1.1" 500 Internal Server Error
agixt-agixt-1      | ERROR:    Exception in ASGI application
agixt-agixt-1      | Traceback (most recent call last):
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi
agixt-agixt-1      |     result = await app(  # type: ignore[func-returns-value]
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
agixt-agixt-1      |     return await self.app(scope, receive, send)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 292, in __call__
agixt-agixt-1      |     await super().__call__(scope, receive, send)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 122, in __call__
agixt-agixt-1      |     await self.middleware_stack(scope, receive, send)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in __call__
agixt-agixt-1      |     raise exc
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in __call__
agixt-agixt-1      |     await self.app(scope, receive, _send)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 91, in __call__
agixt-agixt-1      |     await self.simple_response(scope, receive, send, request_headers=headers)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 146, in simple_response
agixt-agixt-1      |     await self.app(scope, receive, send)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
agixt-agixt-1      |     raise exc
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
agixt-agixt-1      |     await self.app(scope, receive, sender)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in __call__
agixt-agixt-1      |     raise e
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in __call__
agixt-agixt-1      |     await self.app(scope, receive, send)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 718, in __call__
agixt-agixt-1      |     await route.handle(scope, receive, send)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
agixt-agixt-1      |     await self.app(scope, receive, send)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 66, in app
agixt-agixt-1      |     response = await func(request)
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 273, in app
agixt-agixt-1      |     raw_response = await run_endpoint_function(
agixt-agixt-1      |   File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 190, in run_endpoint_function
agixt-agixt-1      |     return await dependant.call(**values)
agixt-agixt-1      |   File "/agixt/endpoints/Agent.py", line 114, in prompt_agent
agixt-agixt-1      |     response = await agent.run(
agixt-agixt-1      |   File "/agixt/Interactions.py", line 421, in run
agixt-agixt-1      |     await self.websearch.websearch_agent(
agixt-agixt-1      |   File "/agixt/Websearch.py", line 258, in websearch_agent
agixt-agixt-1      |     if websearch_depth > 0:
agixt-agixt-1      | TypeError: '>' not supported between instances of 'str' and 'int'
agixt-agixt-1      | INFO:     172.18.0.1:57844 - "GET /api/conversation/Test?agent_name=Vicuna&limit=100&page=1 HTTP/1.1" 200 OK

Steps to Reproduce the Bug

  1. Pick any agent
  2. Pick any mode
  3. Enable Websearch
  4. Tell it to search for something
  5. Nothing happens on the UI side and the above error appears in the console.

Expected Behavior

After enabling Websearch and telling the agent to search for something it calls the Websearch.py and it executes correctly allowing the agent to continue.

Operating System

  • Linux
  • Microsoft Windows
  • Apple MacOS
  • Android
  • iOS
  • Other

Python Version

  • Python <= 3.9
  • Python 3.10
  • Python 3.11

Environment Type - Connection

  • Local - You run AGiXT in your home network
  • Remote - You access AGiXT through the internet

Runtime environment

  • Using docker compose
  • Using local
  • Custom setup (please describe above!)

Acknowledgements

  • I have searched the existing issues to make sure this bug has not been reported yet.
  • I am using the latest version of AGiXT.
  • I have provided enough information for the maintainers to reproduce and diagnose the issue.
@dog3-l0ver dog3-l0ver added needs triage Needs labels assigned. type | report | bug Confirmed bug in source code. labels Oct 4, 2023
Josh-XT added a commit that referenced this issue Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs labels assigned. type | report | bug Confirmed bug in source code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant