| 255 | text = '{"error":{"message":"max_tokens is not compatible with this model. Use max_completion_tokens instead."}}' |
| 256 | |
| 257 | class GoodResponse: |
| 258 | status_code = 200 |
| 259 | text = '{"choices":[{"message":{"content":"红墨连接测试成功"}}]}' |
| 260 | |
| 261 | def json(self): |
| 262 | return {"choices": [{"message": {"content": "红墨连接测试成功"}}]} |
| 263 | |
| 264 | def fake_post(url, headers=None, json=None, timeout=None): |
| 265 | calls.append(json) |