viho-llm 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -497,10 +497,14 @@ const OpenAIAPI = (options) => {
497
497
 
498
498
  // openai
499
499
  const openai = {};
500
- openai.client = new OpenAI({
500
+ const clientOptions = {
501
501
  apiKey: options.apiKey,
502
502
  baseURL: options.baseURL,
503
- });
503
+ };
504
+ if (options.defaultHeaders) {
505
+ clientOptions.defaultHeaders = options.defaultHeaders;
506
+ }
507
+ openai.client = new OpenAI(clientOptions);
504
508
 
505
509
  // chat
506
510
  openai.chat = async (chatOptions) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viho-llm",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Utility library for working with multiple LLM providers (Google Gemini and OpenAI), providing common tools and helpers for AI interactions",
5
5
  "keywords": [
6
6
  "llm",
@@ -68,5 +68,5 @@
68
68
  }
69
69
  }
70
70
  },
71
- "gitHead": "1cf5a70d8978834ee91576c9126040a3357e34d0"
71
+ "gitHead": "990e74da184751aaee5085fe87a4a9f87fa33064"
72
72
  }
@@ -32,10 +32,14 @@ export const OpenAIAPI = (options) => {
32
32
 
33
33
  // openai
34
34
  const openai = {};
35
- openai.client = new OpenAI({
35
+ const clientOptions = {
36
36
  apiKey: options.apiKey,
37
37
  baseURL: options.baseURL,
38
- });
38
+ };
39
+ if (options.defaultHeaders) {
40
+ clientOptions.defaultHeaders = options.defaultHeaders;
41
+ }
42
+ openai.client = new OpenAI(clientOptions);
39
43
 
40
44
  // chat
41
45
  openai.chat = async (chatOptions) => {