Call the latest models using the OpenAI format including: Llama, Mistral, Claude, Gemini, Gemma, DALL-E, Whisper
LiteLLM allows tracking 100+ LLMs with AgentOps. Checkout the providers supported by LiteLLM.
Visit the LiteLLM docs for more information.
Using AgentOps with LiteLLM
1
Install the AgentOps SDK
pip install agentops
poetry add agentops
2
Install LiteLLM
AgentOps supports litellm>=1.3.1
pip install litellm
poetry add litellm
3
Initialize AgentOps and use LiteLLM in your code
AgentOps requires a minor adjustment to how you call LiteLLM. This is because of other existing integrations that use the completion function.
import agentopsimport litellmagentops.init(<INSERT YOUR API KEY HERE>)# Some code here...response = litellm.completion(model="gpt-4o", messages=messages)# Some code here...agentops.end_session('Success')
Set your API key as an .env variable for easy access.