MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / test_completion

Method test_completion

app/e2e/sdk-api/src/test_basic_agent.py:33–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

31 await self.db.delete("sessions", "project_id", Project.ID)
32
33 async def test_completion(self):
34 await self.agent.async_chat_completion()
35 time.sleep(2)
36 sessions = await self.db.get("sessions", "id", "project_id", Project.ID)
37 llm_calls = await self.db.get("llms", "*", "session_id", sessions[0].get("id"))
38
39 self.assertEqual(
40 llm_calls[0].get("prompt").get("messages")[0].get("content"),
41 "Say this is an async test",
42 )
43 self.assertIsNotNone(sessions[0].get("id"))
44
45 async def test_stream_completion(self):
46 await self.agent.async_chat_completion_stream()

Callers

nothing calls this directly

Calls 2

async_chat_completionMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected