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

feat(operator): add agent testing functionality with endpoint #113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Praveenk8051
Copy link
Contributor

@Praveenk8051 Praveenk8051 commented Jan 30, 2025

  • Extended the AgentSpecification
  • Added an endpoint field to handle the URL of the deployed agent.
  • Enhanced the OperatorToolBox
  • Added a test method to parse and handle conversational input.
  • Implemented logic to find the appropriate specification, verify access, and run a sample test.
# Example usage
async def main():
    # Initialize OperatorToolBox with AgentSpecification
    spec = AgentSpecification(
        name="GPT-4",
        version="4.0",
        description="A powerful language model",
        capabilities=["text-generation", "question-answering"],
        configuration={"max_tokens": 100},
    )

    toolbox = OperatorToolBox(spec=spec, datasets=["dataset1", "dataset2", "dataset3"])

    # Description and sample test payload
    description = "Test my openAI compatible agent deployed at http://localhost:3000"
    sample_test = {
        "prompt": "Hello, how are you?",
        "max_tokens": 5
    }

    # Run the test
    result = await toolbox.test(description, sample_test)
    print(result)

# Run the example
asyncio.run(main())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant