Integrating AgentOps with Haystack only takes a few lines:
Copy
import agentopsfrom haystack.components.generators.openai import OpenAIGeneratoragentops.init(AGENTOPS_API_KEY)generator = OpenAIGenerator(model="gpt-4o-mini", api_key=OPENAI_API_KEY)result = generator.run(prompt="In one sentence, what is AgentOps?")print(result["replies"][0])