How to use AgentOps with LangChain
api_key
(Optional, string): API Key for AgentOps services. If not provided, the key will be read from the AGENTOPS_API_KEY
environment variable.endpoint
(Optional, string): The endpoint for the AgentOps service. Defaults to ‘https://api.agentops.ai’.max_wait_time
(Optional, int): The maximum time to wait in milliseconds before flushing the queue. Defaults to 30,000 (30 seconds).max_queue_size
(Optional, int): The maximum size of the event queue. Defaults to 100.tags
(Optional, List[string]): Tags for the sessions for grouping or sorting (e.g., [“GPT-4”])..init()
, pass in the proper parameter.
agentops.init(instrument_llm_calls=False)
If you are building an Agent framework or other SDK and adding support for AgentOps, you cannot guarantee that your end user will
properly include instrument_llm_calls=False
.