Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

withmartian/martian-python-v1

 
 

Repository files navigation

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"]  
)

About

The official Python library for the OpenAI API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.7%
  • Other 0.3%