Skip to main content

Inference client for the Cellium Network. Created by Agent Artificial. Based on OpenAI's API Client.

Project description

Agent Artificial OpenAI Client

This library enables OpenAI standard client to interface with the Agent Artificial API endpoints for inference.

Instillation

pip install agentartificial

Usage

Import AgentArtificial and instantiate a new instance and pass the OpenAI class into the agent client. It will automatically configure the client to hit Agent Artificial endpoints.

Example

import os
from dotenv import load_dotenv
from agentartificial import AgentArtificial

load_dotenv()

client = AgentArtificial()



response = client.chat.completions.create(
    model=client.agent_model,
    messages=[
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Who won the world series in 2020?"},
            {
                "role": "assistant",
                "content": "The Los Angeles Dodgers won the World Series in 2020.",
            },
            {"role": "user", "content": "Where was it played?"},
        ]
)
message = response['data']['choices'][0]['message']['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

cellium-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

cellium-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file cellium-0.1.0.tar.gz.

File metadata

  • Download URL: cellium-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.7 Linux/5.15.0-105-generic

File hashes

Hashes for cellium-0.1.0.tar.gz
Algorithm Hash digest
SHA256 28b628f2a87796b479b0258f86a324f17270d7f03bbcb3be21e9206b79946fee
MD5 9448b04c87e0ab714576c3e9c71db632
BLAKE2b-256 712dee559458b78db8144f8c44d5a2404d0688befe95097e32555321ab980490

See more details on using hashes here.

File details

Details for the file cellium-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cellium-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.7 Linux/5.15.0-105-generic

File hashes

Hashes for cellium-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8f1cf4e163a00d0e40734595f7e9b7026b819d1b50fecd00d9508e5a975e92d5
MD5 1f50d56fe412acb075d2ddeb16339f52
BLAKE2b-256 644f044ba1b8ea717bb7da023c85e2f9d2dc0aba12a253bcfbb92e3b814b22fd

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