@yourgpt/llm-sdk 2.5.1-beta.6 → 2.6.0-beta.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.
Files changed (57) hide show
  1. package/README.md +77 -0
  2. package/dist/adapters/index.d.mts +54 -5
  3. package/dist/adapters/index.d.ts +54 -5
  4. package/dist/adapters/index.js +466 -169
  5. package/dist/adapters/index.mjs +466 -169
  6. package/dist/{base-C58Dsr9p.d.ts → base-BdTpUAWI.d.ts} +2 -1
  7. package/dist/{base-tNgbBaSo.d.mts → base-CkeT7u-O.d.mts} +2 -1
  8. package/dist/fallback/index.d.mts +4 -4
  9. package/dist/fallback/index.d.ts +4 -4
  10. package/dist/fallback/index.js +75 -39
  11. package/dist/fallback/index.mjs +75 -39
  12. package/dist/index.d.mts +8 -7
  13. package/dist/index.d.ts +8 -7
  14. package/dist/index.js +89 -30
  15. package/dist/index.mjs +89 -30
  16. package/dist/providers/anthropic/index.d.mts +3 -3
  17. package/dist/providers/anthropic/index.d.ts +3 -3
  18. package/dist/providers/azure/index.d.mts +3 -3
  19. package/dist/providers/azure/index.d.ts +3 -3
  20. package/dist/providers/azure/index.js +8 -3
  21. package/dist/providers/azure/index.mjs +8 -3
  22. package/dist/providers/fireworks/index.d.mts +3 -3
  23. package/dist/providers/fireworks/index.d.ts +3 -3
  24. package/dist/providers/fireworks/index.js +466 -169
  25. package/dist/providers/fireworks/index.mjs +466 -169
  26. package/dist/providers/google/index.d.mts +3 -3
  27. package/dist/providers/google/index.d.ts +3 -3
  28. package/dist/providers/google/index.js +466 -169
  29. package/dist/providers/google/index.mjs +466 -169
  30. package/dist/providers/ollama/index.d.mts +4 -4
  31. package/dist/providers/ollama/index.d.ts +4 -4
  32. package/dist/providers/openai/index.d.mts +6 -23
  33. package/dist/providers/openai/index.d.ts +6 -23
  34. package/dist/providers/openai/index.js +912 -500
  35. package/dist/providers/openai/index.mjs +912 -500
  36. package/dist/providers/openrouter/index.d.mts +3 -3
  37. package/dist/providers/openrouter/index.d.ts +3 -3
  38. package/dist/providers/openrouter/index.js +466 -169
  39. package/dist/providers/openrouter/index.mjs +466 -169
  40. package/dist/providers/togetherai/index.d.mts +3 -3
  41. package/dist/providers/togetherai/index.d.ts +3 -3
  42. package/dist/providers/togetherai/index.js +466 -169
  43. package/dist/providers/togetherai/index.mjs +466 -169
  44. package/dist/providers/xai/index.d.mts +3 -3
  45. package/dist/providers/xai/index.d.ts +3 -3
  46. package/dist/providers/xai/index.js +466 -169
  47. package/dist/providers/xai/index.mjs +466 -169
  48. package/dist/{types-BkQCSiIt.d.mts → types-BW3csYo5.d.mts} +22 -1
  49. package/dist/{types-BkQCSiIt.d.ts → types-BW3csYo5.d.ts} +22 -1
  50. package/dist/{types-B6dhnguR.d.mts → types-BWRYIvl_.d.mts} +11 -4
  51. package/dist/{types-CCxPmkmK.d.ts → types-CpXcT-tY.d.ts} +11 -4
  52. package/dist/{types-BQ31QIsA.d.ts → types-DA54bSmX.d.ts} +3 -11
  53. package/dist/{types-BSSiJW2o.d.mts → types-NOswlhm9.d.mts} +3 -11
  54. package/dist/yourgpt/index.d.mts +1 -1
  55. package/dist/yourgpt/index.d.ts +1 -1
  56. package/package.json +115 -48
  57. package/LICENSE +0 -21
@@ -1,8 +1,8 @@
1
- import { c as OllamaProviderConfig, A as AIProvider } from '../../types-BSSiJW2o.mjs';
2
- export { d as OllamaModelOptions } from '../../types-BSSiJW2o.mjs';
3
- import '../../types-BkQCSiIt.mjs';
1
+ import { c as OllamaProviderConfig, A as AIProvider } from '../../types-NOswlhm9.mjs';
2
+ export { d as OllamaModelOptions } from '../../types-NOswlhm9.mjs';
3
+ import '../../types-BW3csYo5.mjs';
4
4
  import 'zod';
5
- import '../../base-tNgbBaSo.mjs';
5
+ import '../../base-CkeT7u-O.mjs';
6
6
 
7
7
  /**
8
8
  * Ollama Provider
@@ -1,8 +1,8 @@
1
- import { c as OllamaProviderConfig, A as AIProvider } from '../../types-BQ31QIsA.js';
2
- export { d as OllamaModelOptions } from '../../types-BQ31QIsA.js';
3
- import '../../types-BkQCSiIt.js';
1
+ import { c as OllamaProviderConfig, A as AIProvider } from '../../types-DA54bSmX.js';
2
+ export { d as OllamaModelOptions } from '../../types-DA54bSmX.js';
3
+ import '../../types-BW3csYo5.js';
4
4
  import 'zod';
5
- import '../../base-C58Dsr9p.js';
5
+ import '../../base-BdTpUAWI.js';
6
6
 
7
7
  /**
8
8
  * Ollama Provider
@@ -1,27 +1,10 @@
1
- import { L as LanguageModel } from '../../types-BkQCSiIt.mjs';
2
- import { O as OpenAIProviderConfig, A as AIProvider } from '../../types-BSSiJW2o.mjs';
1
+ import { a7 as OpenAIParameterOptions, L as LanguageModel } from '../../types-BW3csYo5.mjs';
2
+ export { O as OpenAIReasoningEffort } from '../../types-BW3csYo5.mjs';
3
+ import { O as OpenAIProviderConfig, A as AIProvider } from '../../types-NOswlhm9.mjs';
3
4
  import 'zod';
4
- import '../../base-tNgbBaSo.mjs';
5
+ import '../../base-CkeT7u-O.mjs';
5
6
 
6
- /**
7
- * OpenAI Provider - Modern Pattern
8
- *
9
- * Returns a LanguageModel instance that can be used directly with
10
- * generateText() and streamText().
11
- *
12
- * @example
13
- * ```ts
14
- * import { openai } from '@yourgpt/llm-sdk/openai';
15
- * import { generateText } from '@yourgpt/llm-sdk';
16
- *
17
- * const result = await generateText({
18
- * model: openai('gpt-4o'),
19
- * prompt: 'Hello!',
20
- * });
21
- * ```
22
- */
23
-
24
- interface OpenAIProviderOptions {
7
+ interface OpenAIProviderOptions extends OpenAIParameterOptions {
25
8
  /** API key (defaults to OPENAI_API_KEY env var) */
26
9
  apiKey?: string;
27
10
  /** Base URL for API (defaults to https://api.openai.com/v1) */
@@ -84,4 +67,4 @@ declare function openai(modelId: string, options?: OpenAIProviderOptions): Langu
84
67
  declare function createOpenAI(config?: OpenAIProviderConfig): AIProvider;
85
68
  declare const createOpenAIProvider: typeof createOpenAI;
86
69
 
87
- export { type OpenAIProviderOptions, createOpenAI, openai as createOpenAIModel, createOpenAIProvider, openai };
70
+ export { OpenAIParameterOptions, type OpenAIProviderOptions, createOpenAI, openai as createOpenAIModel, createOpenAIProvider, openai };
@@ -1,27 +1,10 @@
1
- import { L as LanguageModel } from '../../types-BkQCSiIt.js';
2
- import { O as OpenAIProviderConfig, A as AIProvider } from '../../types-BQ31QIsA.js';
1
+ import { a7 as OpenAIParameterOptions, L as LanguageModel } from '../../types-BW3csYo5.js';
2
+ export { O as OpenAIReasoningEffort } from '../../types-BW3csYo5.js';
3
+ import { O as OpenAIProviderConfig, A as AIProvider } from '../../types-DA54bSmX.js';
3
4
  import 'zod';
4
- import '../../base-C58Dsr9p.js';
5
+ import '../../base-BdTpUAWI.js';
5
6
 
6
- /**
7
- * OpenAI Provider - Modern Pattern
8
- *
9
- * Returns a LanguageModel instance that can be used directly with
10
- * generateText() and streamText().
11
- *
12
- * @example
13
- * ```ts
14
- * import { openai } from '@yourgpt/llm-sdk/openai';
15
- * import { generateText } from '@yourgpt/llm-sdk';
16
- *
17
- * const result = await generateText({
18
- * model: openai('gpt-4o'),
19
- * prompt: 'Hello!',
20
- * });
21
- * ```
22
- */
23
-
24
- interface OpenAIProviderOptions {
7
+ interface OpenAIProviderOptions extends OpenAIParameterOptions {
25
8
  /** API key (defaults to OPENAI_API_KEY env var) */
26
9
  apiKey?: string;
27
10
  /** Base URL for API (defaults to https://api.openai.com/v1) */
@@ -84,4 +67,4 @@ declare function openai(modelId: string, options?: OpenAIProviderOptions): Langu
84
67
  declare function createOpenAI(config?: OpenAIProviderConfig): AIProvider;
85
68
  declare const createOpenAIProvider: typeof createOpenAI;
86
69
 
87
- export { type OpenAIProviderOptions, createOpenAI, openai as createOpenAIModel, createOpenAIProvider, openai };
70
+ export { OpenAIParameterOptions, type OpenAIProviderOptions, createOpenAI, openai as createOpenAIModel, createOpenAIProvider, openai };