client
client copied to clipboard
Set default index of 0 if not defined by API server (e.g. OpenRouter)
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.
Sorry for delay. Marking as draft due to conflicts.
Something went odd with the rebase/merge here.
I believe this has been addressed in other ways in newer versions, so I am closing this PR. Thanks