Coder Social home page Coder Social logo

superagent-py's People

Contributors

dannysheridan avatar dsinghvi avatar fern-api[bot] avatar homanp avatar mfurquimdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

superagent-py's Issues

API definition mismatch

I've created an agent using the admin interface and tried using it with the SDK.
It seems there's an entity definition mismatch.

SDK version 0.1.36

Traceback (most recent call last):
  File ".../main.py", line 5, in <module>
    agent = client.agent.get("XXXXXX")
  File ".../lib/python3.10/site-packages/superagent/resources/agent/client.py", line 89, in get
    return pydantic.parse_obj_as(AppModelsResponseAgent, _response.json())  # type: ignore
  File ".../lib/python3.10/site-packages/pydantic/v1/tools.py", line 38, in parse_obj_as
    return model_type(__root__=obj).__root__
  File ".../lib/python3.10/site-packages/pydantic/v1/main.py", line 341, in __init__
    raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for ParsingModel[AppModelsResponseAgent]
__root__ -> data -> llms -> 0 -> llm -> options

`gpt-4-1106-preview`missing from LLM enums

I've created an agent using the admin interface and tried using it with the SDK.

It seems that gpt-4-1106-preview is missing.

Traceback (most recent call last):
  File "main.py", line 5, in <module>
    agent = client.agent.get("f60830db-8cd2-47c3-98ea-671ef4e0ee4c")
  File ".../lib/python3.10/site-packages/superagent/resources/agent/client.py", line 89, in get
    return pydantic.parse_obj_as(AppModelsResponseAgent, _response.json())  # type: ignore
  File ".../lib/python3.10/site-packages/pydantic/v1/tools.py", line 38, in parse_obj_as
    return model_type(__root__=obj).__root__
  File ".../lib/python3.10/site-packages/pydantic/v1/main.py", line 341, in __init__
    raise validation_error
pydantic.v1.error_wrappers.ValidationError: 2 validation errors for ParsingModel[AppModelsResponseAgent]
__root__ -> data -> llms -> 0 -> llm -> options
  str type expected (type=type_error.str)
__root__ -> data -> llmModel
  value is not a valid enumeration member; permitted: 'GPT_3_5_TURBO_16K_0613', 'GPT_3_5_TURBO_0613', 'GPT_4_0613', 'GPT_4_32K_0613' (type=type_error.enum; enum_values=[<LlmModel.GPT_3_5_TURBO_16_K_0613: 'GPT_3_5_TURBO_16K_0613'>, <LlmModel.GPT_3_5_TURBO_0613: 'GPT_3_5_TURBO_0613'>, <LlmModel.GPT_4_0613: 'GPT_4_0613'>, <LlmModel.GPT_4_32_K_0613: 'GPT_4_32K_0613'>])

I need your help creating an example with superagent-py and MiniAutoGen: Lightweight and Flexible Agents for Multi-Agent Chats

๐ŸŒ Hello, amazing community!

I'm exploring the integration of two powerful libraries: MiniAutoGen and superagent-py, and I would greatly appreciate your help and insights!

MiniAutoGen is an innovative open-source library designed to take applications with Large Language Models (LLMs) to the next level. Its differentiators are its lightweight and flexible approach, which allows for a high degree of customization.

Here are some notable features of MiniAutoGen:

  • Multi-Agent Dialogues: The ability to create complex and nuanced interactions with multiple intelligent agents operating together.
  • Agent Coordination: A mechanism that ensures harmony and efficient management among the agents.
  • Customizable Agents: Total freedom to shape agent behaviors according to project needs.
  • Action Pipeline: Simplifies and automates agent operations, facilitating scalability and maintenance.
  • Integration with +100 LLMs: Expanding conversational capabilities with over 100 LLMs for intelligent and contextualized responses.

My Challenge: I'm seeking help from the community to develop new integrations and modules.

I Seek Your Help: Do you have examples, tips, or guidance on how I can accomplish this integration? Any insight or shared experience would be extremely valuable!

Check out MiniAutoGen on Google Colab: MiniAutoGen on Google Colab
And here is the GitHub repository for more information: GitHub - brunocapelao/miniAutoGen

I'm looking forward to your ideas and suggestions. Let's shape the future of AI conversations together! ๐ŸŒŸ

AttributeError: 'Superagent' object has no attribute 'agents'

AttributeError                            Traceback (most recent call last)
[/Users/dekahalane/superagent-py/test.ipynb](https://file+.vscode-resource.vscode-cdn.net/Users/dekahalane/superagent-py/test.ipynb) Cell 1 line 6
      [2](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=1) from superagent.client import Superagent
      [4](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=3) client = Superagent(token="REMOVED FOR DEBUGGING", base_url="https://api.beta.superagent.sh/")
----> [6](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=5) agent = client.agents.create(request={
      [7](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=6)     "name": "My Agent",
      [8](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=7)     "description": "My awesome agent",
      [9](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=8)     "isActive": True,
     [10](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=9)     "llmModel": "GPT_4_0613"
     [11](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=10) })
     [13](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=12) output = client.agent.invoke(
     [14](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=13)     agent_id=agent.data.id,
     [15](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=14)     input="Hi there!",
     [16](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=15)     enable_streaming=False,
     [17](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=16)     session_id="123"
     [18](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=17) )
     [20](vscode-notebook-cell:/Users/dekahalane/superagent-py/test.ipynb#W0sZmlsZQ%3D%3D?line=19) print("Received response from superagent", agent.data)

AttributeError: 'Superagent' object has no attribute 'agents'

I can't find the documentation to fix this error, I've tried both removing the agents from client.agents.create and just the s as I thought it might be a typo but then it throws an InternalServerError

Typo on README.md

Hi,

This is just a small thing I saw when reading about the tool. There's a typo on README.md. It is written Flase instead of False.

Unable To Use SDK With API Tokens

Problem Statement / Overview

Hi there, I'm unable to use the SDK with API Tokens. I keep getting {'detail': 'Not authenticated'}. I think it's most likely because the API doesn't seem to accept API Tokens, only bearer auth (https://github.com/homanp/superagent/blob/7e73c21cde43c39c4e83d7ec069e4e0f7ec816c2/app/api/agents.py#L70C50-L70C59)

Expected Output

I would expect the GET request to return my agent successfully. But, let me know if I'm initializing it incorrectly in my code snippet below.

Code Snippet

I included a code snippet with how I'm initializing the client

class WrappedSuperagent(object):
    def __init__(self, api_token: str, environment="https://api.superagent.sh"):
        self._client = Superagent(environment=environment, api_key=api_token)

    # Begin Public Methods
    def get_agent(self, agent_id: str) -> typing.Any:
        return self._get_agent(agent_id)        
    # End Public Methods

    # Begin Private Methods
    def _get_agent(self, agent_id: str) -> typing.Any:
        agent = self._client.agent.get_agent(agent_id) #### ---- Error starts here
        return agent
    # End Private Methods

Let me know if you need anymore info and I'm happy to add that as well!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.