@yourgpt/llm-sdk 2.1.8 → 2.1.9

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.
@@ -1,5 +1,7 @@
1
1
  import { L as LanguageModel } from '../../types-CR8mi9I0.mjs';
2
+ import { A as AIProvider } from '../../types-DRqxMIjF.mjs';
2
3
  import 'zod';
4
+ import '../../base-D-U61JaB.mjs';
3
5
 
4
6
  /**
5
7
  * Together AI Provider
@@ -50,4 +52,61 @@ interface TogetherAIProviderOptions {
50
52
  */
51
53
  declare function togetherai(modelId: string, options?: TogetherAIProviderOptions): LanguageModel;
52
54
 
53
- export { type TogetherAIProviderOptions, togetherai as createTogetherAI, togetherai };
55
+ /**
56
+ * Together AI Provider
57
+ *
58
+ * Together AI is a high-performance inference platform for open-source models
59
+ * (Llama, DeepSeek, Qwen, Mistral, Gemma, and more).
60
+ *
61
+ * Uses an OpenAI-compatible API — set TOGETHER_API_KEY in your environment.
62
+ *
63
+ * @see https://docs.together.ai/reference
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * // Modern pattern — returns LanguageModel directly
68
+ * import { togetherai } from '@yourgpt/llm-sdk/togetherai';
69
+ * import { generateText } from '@yourgpt/llm-sdk';
70
+ *
71
+ * const result = await generateText({
72
+ * model: togetherai('meta-llama/Llama-3.3-70B-Instruct-Turbo'),
73
+ * prompt: 'Hello!',
74
+ * });
75
+ *
76
+ * // Legacy pattern — returns AIProvider for createRuntime
77
+ * import { createTogetherAI } from '@yourgpt/llm-sdk/togetherai';
78
+ * import { createRuntime } from '@yourgpt/llm-sdk';
79
+ *
80
+ * const provider = createTogetherAI({ apiKey: '...' });
81
+ * const runtime = createRuntime({ provider, model: 'meta-llama/Llama-3.3-70B-Instruct-Turbo' });
82
+ * ```
83
+ */
84
+
85
+ interface TogetherAIProviderConfig {
86
+ /** API key (defaults to TOGETHER_API_KEY env var) */
87
+ apiKey?: string;
88
+ /** Base URL for API */
89
+ baseUrl?: string;
90
+ }
91
+ /**
92
+ * Create a Together AI provider (callable, for use with createRuntime)
93
+ *
94
+ * @example
95
+ * ```typescript
96
+ * import { createTogetherAI } from '@yourgpt/llm-sdk/togetherai';
97
+ * import { createRuntime } from '@yourgpt/llm-sdk';
98
+ *
99
+ * const together = createTogetherAI({ apiKey: '...' });
100
+ * const runtime = createRuntime({
101
+ * provider: together,
102
+ * model: 'meta-llama/Llama-3.3-70B-Instruct-Turbo',
103
+ * });
104
+ *
105
+ * // Handle incoming chat requests
106
+ * return runtime.handleRequest(request);
107
+ * ```
108
+ */
109
+ declare function createTogetherAI(config?: TogetherAIProviderConfig): AIProvider;
110
+ declare const createTogetherAIProvider: typeof createTogetherAI;
111
+
112
+ export { type TogetherAIProviderConfig, type TogetherAIProviderOptions, createTogetherAI, createTogetherAIProvider, togetherai };
@@ -1,5 +1,7 @@
1
1
  import { L as LanguageModel } from '../../types-CR8mi9I0.js';
2
+ import { A as AIProvider } from '../../types-BctsnC3g.js';
2
3
  import 'zod';
4
+ import '../../base-iGi9Va6Z.js';
3
5
 
4
6
  /**
5
7
  * Together AI Provider
@@ -50,4 +52,61 @@ interface TogetherAIProviderOptions {
50
52
  */
51
53
  declare function togetherai(modelId: string, options?: TogetherAIProviderOptions): LanguageModel;
52
54
 
53
- export { type TogetherAIProviderOptions, togetherai as createTogetherAI, togetherai };
55
+ /**
56
+ * Together AI Provider
57
+ *
58
+ * Together AI is a high-performance inference platform for open-source models
59
+ * (Llama, DeepSeek, Qwen, Mistral, Gemma, and more).
60
+ *
61
+ * Uses an OpenAI-compatible API — set TOGETHER_API_KEY in your environment.
62
+ *
63
+ * @see https://docs.together.ai/reference
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * // Modern pattern — returns LanguageModel directly
68
+ * import { togetherai } from '@yourgpt/llm-sdk/togetherai';
69
+ * import { generateText } from '@yourgpt/llm-sdk';
70
+ *
71
+ * const result = await generateText({
72
+ * model: togetherai('meta-llama/Llama-3.3-70B-Instruct-Turbo'),
73
+ * prompt: 'Hello!',
74
+ * });
75
+ *
76
+ * // Legacy pattern — returns AIProvider for createRuntime
77
+ * import { createTogetherAI } from '@yourgpt/llm-sdk/togetherai';
78
+ * import { createRuntime } from '@yourgpt/llm-sdk';
79
+ *
80
+ * const provider = createTogetherAI({ apiKey: '...' });
81
+ * const runtime = createRuntime({ provider, model: 'meta-llama/Llama-3.3-70B-Instruct-Turbo' });
82
+ * ```
83
+ */
84
+
85
+ interface TogetherAIProviderConfig {
86
+ /** API key (defaults to TOGETHER_API_KEY env var) */
87
+ apiKey?: string;
88
+ /** Base URL for API */
89
+ baseUrl?: string;
90
+ }
91
+ /**
92
+ * Create a Together AI provider (callable, for use with createRuntime)
93
+ *
94
+ * @example
95
+ * ```typescript
96
+ * import { createTogetherAI } from '@yourgpt/llm-sdk/togetherai';
97
+ * import { createRuntime } from '@yourgpt/llm-sdk';
98
+ *
99
+ * const together = createTogetherAI({ apiKey: '...' });
100
+ * const runtime = createRuntime({
101
+ * provider: together,
102
+ * model: 'meta-llama/Llama-3.3-70B-Instruct-Turbo',
103
+ * });
104
+ *
105
+ * // Handle incoming chat requests
106
+ * return runtime.handleRequest(request);
107
+ * ```
108
+ */
109
+ declare function createTogetherAI(config?: TogetherAIProviderConfig): AIProvider;
110
+ declare const createTogetherAIProvider: typeof createTogetherAI;
111
+
112
+ export { type TogetherAIProviderConfig, type TogetherAIProviderOptions, createTogetherAI, createTogetherAIProvider, togetherai };