(*args, **kwargs)
| 27 | |
| 28 | |
| 29 | def 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 |
nothing calls this directly
no outgoing calls
no test coverage detected