MCPcopy Create free account
hub / github.com/Forethought-Technologies/AutoChain / side_effect

Function side_effect

tests/agent/test_conversational_agent.py:29–55  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

27
28
29def side_effect(*args, **kwargs):
30 message = kwargs["messages"][0]["content"]
31
32 if "good" in message:
33 return {
34 "choices": [
35 {
36 "message": {
37 "role": "assistant",
38 "content": "yes, question is resolved",
39 }
40 }
41 ],
42 "usage": 10,
43 }
44 else:
45 return {
46 "choices": [
47 {
48 "message": {
49 "role": "assistant",
50 "content": "no, question is not resolved",
51 }
52 }
53 ],
54 "usage": 10,
55 }
56
57
58@pytest.fixture

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected