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
Release history Release notifications | RSS feed
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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28b628f2a87796b479b0258f86a324f17270d7f03bbcb3be21e9206b79946fee |
|
MD5 | 9448b04c87e0ab714576c3e9c71db632 |
|
BLAKE2b-256 | 712dee559458b78db8144f8c44d5a2404d0688befe95097e32555321ab980490 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f1cf4e163a00d0e40734595f7e9b7026b819d1b50fecd00d9508e5a975e92d5 |
|
MD5 | 1f50d56fe412acb075d2ddeb16339f52 |
|
BLAKE2b-256 | 644f044ba1b8ea717bb7da023c85e2f9d2dc0aba12a253bcfbb92e3b814b22fd |