Python client library for the Martian API
Project description
Martian Python API library
The Martin Python library is a drop in replacement for OpenAI package
Documentation
The API documentation can be found here.
Installation
pip install martian-python
Usage
from martian import OpenAI
client = OpenAI(
api_key="My MARTIAN Key", # defaults to os.environ.get("MARTIAN_API_KEY")
)
chat_completion = client.chat.completions.create(
messages=[
{
"role": "user",
"content": "Say this is a test",
}
],
model="router",
# If more than one model is specified, the router chooses the best among them
# model=["gpt-3.5-turbo", "claude-v1"]
)
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
martian_python-1.5.3.tar.gz
(116.2 kB
view hashes)
Built Distribution
martian_python-1.5.3-py3-none-any.whl
(215.9 kB
view hashes)
Close
Hashes for martian_python-1.5.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7dc046cc7d541d69a05407821971ab16549d3d650674c89b438e0b715018fee |
|
MD5 | 0017e92e865709e5db9e13555e7b32f2 |
|
BLAKE2b-256 | 13aaa8e7e1c4dd8a2ca70de78bb51374a38563a3d10fe90d2d5cca909ee302da |