MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / test_async_content

Function test_async_content

client-libs/python/openpipe/test_async_client.py:34–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32
33
34async def test_async_content():
35 completion = await client.chat.completions.create(
36 model="gpt-3.5-turbo",
37 messages=[{"role": "system", "content": "count to 3"}],
38 openpipe={"tags": {"prompt_id": "test_async_content"}},
39 )
40
41 if not TEST_LAST_LOGGED:
42 return
43
44 await asyncio.sleep(0.1)
45 last_logged = (
46 await client.openpipe_reporting_client.base_client.local_testing_only_get_latest_logged_call()
47 )
48 assert last_logged.req_payload["messages"][0]["content"] == "count to 3"
49 assert (
50 last_logged.resp_payload["choices"][0]["message"]["content"]
51 == completion.choices[0].message.content
52 )
53
54
55async def test_async_content_mistral():

Callers

nothing calls this directly

Calls 2

createMethod · 0.45

Tested by

no test coverage detected