Skip to main content

AgentHub openai package

Project description

Agenthub OpenAI Agent

This package contains the OpenAI agent implementation for AgentHub.

Installation

pip install agenthub-openai

Usage

from agenthub import Team, Agent

team = Team()

def get_weather(location) -> str:
    return "{'temp':67, 'unit':'F'}"

weather_agent = Agent(
    name="Weather AI",
    instructions="You are a helpful agent.",
    functions=[get_weather],
)

messages = [{"role": "user", "content": "What's the weather in NYC?"}]

response = team.run(agent=weather_agent, messages=messages)
print(response.messages[-1]["content"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agenthub_openai-0.0.7.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

agenthub_openai-0.0.7-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file agenthub_openai-0.0.7.tar.gz.

File metadata

  • Download URL: agenthub_openai-0.0.7.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for agenthub_openai-0.0.7.tar.gz
Algorithm Hash digest
SHA256 dc79d6264bfb698b0281b00d92b020bbc5bb2777f6cb005632c8339beb5b206c
MD5 d41c50ab6530ac9f63111364eba82e0d
BLAKE2b-256 c5389ce8fef27990901219c27b361d4622e599ab4ffa8d09e86766fdcb14a6b6

See more details on using hashes here.

File details

Details for the file agenthub_openai-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for agenthub_openai-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 dcdefa8a465dcb9fe53f93fe9fdff0a33b31cd4bbd6f7ba2b5a728b8f1b7b05b
MD5 abc3269947fae448cca5c59afbcd161d
BLAKE2b-256 5ab7109ec1e075d9b08484e1ee4bfd2df87273c7d47af5f02db1297820684de9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page