(
configured_client: AsyncOpenPipe,
openpipe_options={},
**kwargs,
)
| 81 | |
| 82 | |
| 83 | async def report_async( |
| 84 | configured_client: AsyncOpenPipe, |
| 85 | openpipe_options={}, |
| 86 | **kwargs, |
| 87 | ): |
| 88 | if not _should_log_request(configured_client, openpipe_options): |
| 89 | return |
| 90 | |
| 91 | try: |
| 92 | await configured_client.report( |
| 93 | **kwargs, |
| 94 | tags=_get_tags(openpipe_options), |
| 95 | ) |
| 96 | except Exception as e: |
| 97 | # We don't want to break client apps if our API is down for some reason |
| 98 | print(f"Error reporting to OpenPipe: {e}") |
| 99 | print(e) |
| 100 | |
| 101 | |
| 102 | def get_chat_completion_json(completion: ChatCompletion) -> Dict: |
no test coverage detected