Skip to content

Conversation

@luojiyin1987
Copy link

Summary

  • Add module-level singleton clients cached per API key
  • Replace client creation with _get_sync_client/_get_async_client helper functions
  • Fix chat_history mutation side effect (use list concatenation instead of append)
  • Fix error return type inconsistency in ChatGPT_API_with_finish_reason
  • Add missing re import

Closes #71

- Add module-level singleton clients cached per API key
- Replace client creation with _get_sync_client/_get_async_client
- Fix chat_history mutation side effect (use list concatenation)
- Fix error return type inconsistency in ChatGPT_API_with_finish_reason
- Add missing 're' import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reuse OpenAI clients to improve throughput

1 participant