(completion_json, is_llm=False)
| 277 | json.dump({"total_cost": cost}, f) |
| 278 | |
| 279 | def print_response(completion_json, is_llm=False): |
| 280 | print("============================================") |
| 281 | if is_llm: |
| 282 | print(completion_json['text']) |
| 283 | else: |
| 284 | print(completion_json['choices'][0]['message']['content']) |
| 285 | print("============================================\n") |
| 286 | |
| 287 | def print_log_cost(completion_json, gpt_version, current_stage, output_dir, total_accumulated_cost): |
| 288 | usage_info = cal_cost(completion_json, gpt_version) |
no outgoing calls
no test coverage detected