Installation
Install Modelsmith using pip or your favourite python package manager.
pip
example:
Anthropic Authentication
Authentication to Anthropic is done via the Anthropic flow. See the Anthropic documentation for more details.
The AnthropicModel
class takes an optional api_key
parameter. If not provided, the ANTHROPIC_API_KEY
environment variable will be used.
Google Cloud Authentication
Authentication to Google Cloud is done via either: - Application Default Credentials flow. See Google's documentation for more details. - Gemini API Key. See Google Gemini API docs.
The GeminiModel
allows you to pass the vertexai
, api_key
, project
, and location
when you initialize the class instance. If you do not pass this in it will be inferred from the environment variables GOOGLE_GENAI_USE_VERTEXAI
, GOOGLE_API_KEY
, GOOGLE_CLOUD_PROJECT
, and GOOGLE_CLOUD_LOCATION
as per the documentation.
Open AI Authentication
Authentication to OpenAI is done via the OpenAI flow. See the OpenAI documentation for more details.
The OpenAIModel
allows you to pass the api_key
, organization
and project
when you initialize the class instance. If you do not pass this in it will be inferred from the environment variables OPENAI_API_KEY
, OPENAI_ORG_ID
and OPENAI_PROJECT_ID
as per the OpenAI documentation.