kyegomez / swarms

The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework Join our Community: https://discord.com/servers/agora-999382051935506503
https://docs.swarms.world
GNU Affero General Public License v3.0
1.71k stars 226 forks source link

[BUG] TypeError: unsupported operand type(s) for |: 'type' and 'types.GenericAlias' #400

Closed starshipvc closed 1 week ago

starshipvc commented 8 months ago
/Users/athena/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
swarms is up to date!
Traceback (most recent call last):
    from swarms import Agent
  File "/Users/athena/Library/Python/3.9/lib/python/site-packages/swarms/__init__.py", line 7, in <module>
    from swarms.agents import *  # noqa: E402, F403
  File "/Users/athena/Library/Python/3.9/lib/python/site-packages/swarms/agents/__init__.py", line 1, in <module>
    from swarms.agents.agent_wrapper import agent_wrapper
  File "/Users/athena/Library/Python/3.9/lib/python/site-packages/swarms/agents/agent_wrapper.py", line 1, in <module>
    from swarms.structs.agent import Agent
  File "/Users/athena/Library/Python/3.9/lib/python/site-packages/swarms/structs/__init__.py", line 1, in <module>
    from swarms.structs.agent import Agent
  File "/Users/athena/Library/Python/3.9/lib/python/site-packages/swarms/structs/agent.py", line 15, in <module>
    from swarms.memory.base_vectordb import AbstractVectorDatabase
  File "/Users/athena/Library/Python/3.9/lib/python/site-packages/swarms/memory/__init__.py", line 7, in <module>
    from swarms.memory.lanchain_chroma import LangchainChromaVectorMemory
  File "/Users/athena/Library/Python/3.9/lib/python/site-packages/swarms/memory/lanchain_chroma.py", line 10, in <module>
    from swarms.models.openai_models import OpenAIChat
  File "/Users/athena/Library/Python/3.9/lib/python/site-packages/swarms/models/__init__.py", line 32, in <module>
    from swarms.models.openai_models import (
  File "/Users/athena/Library/Python/3.9/lib/python/site-packages/swarms/models/openai_models.py", line 225, in <module>
    class BaseOpenAI(BaseLLM):
  File "pydantic/main.py", line 178, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/typing.py", line 400, in pydantic.typing.resolve_annotations
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py", line 290, in _eval_type
    return t._evaluate(globalns, localns, recursive_guard)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/typing.py", line 546, in _evaluate
    eval(self.__forward_code__, globalns, localns),
  File "<string>", line 1, in <module>
TypeError: unsupported operand type(s) for |: 'type' and 'types.GenericAlias'

Upvote & Fund

Fund with Polar

evelynmitchell commented 8 months ago

Hi starshipvc,

This appears to be coming from "/Users/athena/Desktop/athena/sam_altman.py". Would you be able to share a minimal reproducable example? https://en.wikipedia.org/wiki/Minimal_reproducible_example

Please ask any questions you may have, Evelyn Mitchell