Commit Graph

5 Commits

Author SHA1 Message Date
lloydchang
9abe3f6916 fix(openai.ts): default to an empty string if undefined
Change:

const urlHost = new URL(this.options.openAiBaseUrl).host;

To:

const urlHost = new URL(this.options.openAiBaseUrl ?? "").host;

because the nullish coalescing operator (??) to default to an empty string if this.options.openAiBaseUrl is undefined.

It ensures that the URL constructor always receives a valid string.
2024-12-11 02:37:26 -08:00
lloydchang
7c870733a1 Fix code scanning alert no. 1: Incomplete URL substring sanitization
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-12-11 02:18:04 -08:00
Saoud Rizwan
06ccaf6f67 Implement streaming for all providers 2024-10-09 01:49:55 -04:00
Saoud Rizwan
d81002decc Refactor Azure OpenAI default version 2024-09-24 12:45:24 -04:00
Saoud Rizwan
a009c84597 Refactor API 2024-09-24 10:43:31 -04:00