client icon indicating copy to clipboard operation
client copied to clipboard

Set default index of 0 if not defined by API server (e.g. OpenRouter)

Open giltotherescue opened this issue 11 months ago • 0 comments

What:

  • [x] Bug Fix
  • [ ] New Feature

Description:

By setting a different baseUri, this package is fully compatible with OpenRouter.ai, a service that supports many different AI models through a common interface (OpenAI's).

However, OpenRouter does not provide an "index" property in its responses, which causes the response to fail. Setting a default index of 0 fixes this problem.

giltotherescue avatar Mar 25 '24 20:03 giltotherescue