@yourgpt/llm-sdk 2.0.2-beta.1 → 2.1.0
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/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/index.d.ts +2 -2
- package/dist/index.d.mts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/providers/anthropic/index.d.mts +1 -1
- package/dist/providers/anthropic/index.d.ts +1 -1
- package/dist/providers/azure/index.d.mts +1 -1
- package/dist/providers/azure/index.d.ts +1 -1
- package/dist/providers/google/index.d.mts +1 -1
- package/dist/providers/google/index.d.ts +1 -1
- package/dist/providers/ollama/index.d.mts +2 -2
- package/dist/providers/ollama/index.d.ts +2 -2
- package/dist/providers/openai/index.d.mts +1 -1
- package/dist/providers/openai/index.d.ts +1 -1
- package/dist/providers/openrouter/index.d.mts +1 -1
- package/dist/providers/openrouter/index.d.ts +1 -1
- package/dist/providers/xai/index.d.mts +1 -1
- package/dist/providers/xai/index.d.ts +1 -1
- package/dist/{types-ClJBhmS0.d.mts → types-C_f95PKp.d.mts} +7 -0
- package/dist/{types-ClJBhmS0.d.ts → types-C_f95PKp.d.ts} +7 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LLMAdapter, W as WebSearchConfig, P as ChatCompletionRequest, g as StreamEvent, aj as CompletionResult, a2 as OllamaModelOptions } from '../types-
|
|
2
|
-
export { Q as AdapterFactory, av as AnthropicContentBlock, aw as OpenAIContentBlock, at as attachmentToAnthropicDocument, as as attachmentToAnthropicImage, au as attachmentToOpenAIImage, ak as formatMessages, am as formatMessagesForAnthropic, an as formatMessagesForOpenAI, al as formatTools, aq as hasImageAttachments, ar as hasMediaAttachments, ao as messageToAnthropicContent, ap as messageToOpenAIContent } from '../types-
|
|
1
|
+
import { L as LLMAdapter, W as WebSearchConfig, P as ChatCompletionRequest, g as StreamEvent, aj as CompletionResult, a2 as OllamaModelOptions } from '../types-C_f95PKp.mjs';
|
|
2
|
+
export { Q as AdapterFactory, av as AnthropicContentBlock, aw as OpenAIContentBlock, at as attachmentToAnthropicDocument, as as attachmentToAnthropicImage, au as attachmentToOpenAIImage, ak as formatMessages, am as formatMessagesForAnthropic, an as formatMessagesForOpenAI, al as formatTools, aq as hasImageAttachments, ar as hasMediaAttachments, ao as messageToAnthropicContent, ap as messageToOpenAIContent } from '../types-C_f95PKp.mjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LLMAdapter, W as WebSearchConfig, P as ChatCompletionRequest, g as StreamEvent, aj as CompletionResult, a2 as OllamaModelOptions } from '../types-
|
|
2
|
-
export { Q as AdapterFactory, av as AnthropicContentBlock, aw as OpenAIContentBlock, at as attachmentToAnthropicDocument, as as attachmentToAnthropicImage, au as attachmentToOpenAIImage, ak as formatMessages, am as formatMessagesForAnthropic, an as formatMessagesForOpenAI, al as formatTools, aq as hasImageAttachments, ar as hasMediaAttachments, ao as messageToAnthropicContent, ap as messageToOpenAIContent } from '../types-
|
|
1
|
+
import { L as LLMAdapter, W as WebSearchConfig, P as ChatCompletionRequest, g as StreamEvent, aj as CompletionResult, a2 as OllamaModelOptions } from '../types-C_f95PKp.js';
|
|
2
|
+
export { Q as AdapterFactory, av as AnthropicContentBlock, aw as OpenAIContentBlock, at as attachmentToAnthropicDocument, as as attachmentToAnthropicImage, au as attachmentToOpenAIImage, ak as formatMessages, am as formatMessagesForAnthropic, an as formatMessagesForOpenAI, al as formatTools, aq as hasImageAttachments, ar as hasMediaAttachments, ao as messageToAnthropicContent, ap as messageToOpenAIContent } from '../types-C_f95PKp.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as GenerateTextParams, a as GenerateTextResult, S as StreamTextParams, b as StreamTextResult, T as ToolContext, c as Tool, A as AIProvider, d as ActionDefinition, e as ToolDefinition, f as AgentLoopConfig, K as KnowledgeBaseConfig, W as WebSearchConfig, L as LLMAdapter, D as DoneEventMessage, g as StreamEvent, h as ToolCallInfo, i as TokenUsageRaw, M as Message, j as ToolResponse } from './types-
|
|
2
|
-
export { Q as AdapterFactory, Z as AnthropicProviderConfig, a4 as AnthropicTool, a6 as AnthropicToolResult, a5 as AnthropicToolUse, p as AssistantMessage, a0 as AzureProviderConfig, X as BaseProviderConfig, P as ChatCompletionRequest, ai as Citation, C as CoreMessage, O as DEFAULT_CAPABILITIES, m as DoGenerateParams, n as DoGenerateResult, H as ErrorChunk, F as FilePart, E as FinishChunk, N as FinishReason, ab as GeminiFunctionCall, aa as GeminiFunctionDeclaration, ac as GeminiFunctionResponse, v as GenerateStep, _ as GoogleProviderConfig, I as ImagePart, ad as LLMConfig, k as LanguageModel, l as ModelCapabilities, a2 as OllamaModelOptions, a1 as OllamaProviderConfig, Y as OpenAIProviderConfig, a7 as OpenAITool, a8 as OpenAIToolCall, a9 as OpenAIToolResult, V as ProviderCapabilities, a3 as ProviderFormatter, R as ResponseOptions, x as StreamChunk, w as StreamPart, o as SystemMessage, y as TextDeltaChunk, s as TextPart, J as TokenUsage, t as ToolCall, z as ToolCallChunk, ah as ToolExecution, ae as ToolLocation, q as ToolMessage, u as ToolResult, B as ToolResultChunk, af as UnifiedToolCall, ag as UnifiedToolResult, r as UserContentPart, U as UserMessage, $ as XAIProviderConfig } from './types-
|
|
1
|
+
import { G as GenerateTextParams, a as GenerateTextResult, S as StreamTextParams, b as StreamTextResult, T as ToolContext, c as Tool, A as AIProvider, d as ActionDefinition, e as ToolDefinition, f as AgentLoopConfig, K as KnowledgeBaseConfig, W as WebSearchConfig, L as LLMAdapter, D as DoneEventMessage, g as StreamEvent, h as ToolCallInfo, i as TokenUsageRaw, M as Message, j as ToolResponse } from './types-C_f95PKp.mjs';
|
|
2
|
+
export { Q as AdapterFactory, Z as AnthropicProviderConfig, a4 as AnthropicTool, a6 as AnthropicToolResult, a5 as AnthropicToolUse, p as AssistantMessage, a0 as AzureProviderConfig, X as BaseProviderConfig, P as ChatCompletionRequest, ai as Citation, C as CoreMessage, O as DEFAULT_CAPABILITIES, m as DoGenerateParams, n as DoGenerateResult, H as ErrorChunk, F as FilePart, E as FinishChunk, N as FinishReason, ab as GeminiFunctionCall, aa as GeminiFunctionDeclaration, ac as GeminiFunctionResponse, v as GenerateStep, _ as GoogleProviderConfig, I as ImagePart, ad as LLMConfig, k as LanguageModel, l as ModelCapabilities, a2 as OllamaModelOptions, a1 as OllamaProviderConfig, Y as OpenAIProviderConfig, a7 as OpenAITool, a8 as OpenAIToolCall, a9 as OpenAIToolResult, V as ProviderCapabilities, a3 as ProviderFormatter, R as ResponseOptions, x as StreamChunk, w as StreamPart, o as SystemMessage, y as TextDeltaChunk, s as TextPart, J as TokenUsage, t as ToolCall, z as ToolCallChunk, ah as ToolExecution, ae as ToolLocation, q as ToolMessage, u as ToolResult, B as ToolResultChunk, af as UnifiedToolCall, ag as UnifiedToolResult, r as UserContentPart, U as UserMessage, $ as XAIProviderConfig } from './types-C_f95PKp.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import * as hono from 'hono';
|
|
5
5
|
import { Hono } from 'hono';
|
|
@@ -106,6 +106,13 @@ interface ToolConfig<TParams extends z.ZodType, TResult = unknown> {
|
|
|
106
106
|
parameters: TParams;
|
|
107
107
|
/** Function to execute when the tool is called */
|
|
108
108
|
execute: (params: z.infer<TParams>, context: ToolContext) => Promise<TResult>;
|
|
109
|
+
/**
|
|
110
|
+
* Hide this tool's execution from the chat UI.
|
|
111
|
+
* When true, tool calls and results won't be displayed to the user,
|
|
112
|
+
* but the tool will still execute normally.
|
|
113
|
+
* @default false
|
|
114
|
+
*/
|
|
115
|
+
hidden?: boolean;
|
|
109
116
|
}
|
|
110
117
|
/**
|
|
111
118
|
* Create a type-safe tool definition
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as GenerateTextParams, a as GenerateTextResult, S as StreamTextParams, b as StreamTextResult, T as ToolContext, c as Tool, A as AIProvider, d as ActionDefinition, e as ToolDefinition, f as AgentLoopConfig, K as KnowledgeBaseConfig, W as WebSearchConfig, L as LLMAdapter, D as DoneEventMessage, g as StreamEvent, h as ToolCallInfo, i as TokenUsageRaw, M as Message, j as ToolResponse } from './types-
|
|
2
|
-
export { Q as AdapterFactory, Z as AnthropicProviderConfig, a4 as AnthropicTool, a6 as AnthropicToolResult, a5 as AnthropicToolUse, p as AssistantMessage, a0 as AzureProviderConfig, X as BaseProviderConfig, P as ChatCompletionRequest, ai as Citation, C as CoreMessage, O as DEFAULT_CAPABILITIES, m as DoGenerateParams, n as DoGenerateResult, H as ErrorChunk, F as FilePart, E as FinishChunk, N as FinishReason, ab as GeminiFunctionCall, aa as GeminiFunctionDeclaration, ac as GeminiFunctionResponse, v as GenerateStep, _ as GoogleProviderConfig, I as ImagePart, ad as LLMConfig, k as LanguageModel, l as ModelCapabilities, a2 as OllamaModelOptions, a1 as OllamaProviderConfig, Y as OpenAIProviderConfig, a7 as OpenAITool, a8 as OpenAIToolCall, a9 as OpenAIToolResult, V as ProviderCapabilities, a3 as ProviderFormatter, R as ResponseOptions, x as StreamChunk, w as StreamPart, o as SystemMessage, y as TextDeltaChunk, s as TextPart, J as TokenUsage, t as ToolCall, z as ToolCallChunk, ah as ToolExecution, ae as ToolLocation, q as ToolMessage, u as ToolResult, B as ToolResultChunk, af as UnifiedToolCall, ag as UnifiedToolResult, r as UserContentPart, U as UserMessage, $ as XAIProviderConfig } from './types-
|
|
1
|
+
import { G as GenerateTextParams, a as GenerateTextResult, S as StreamTextParams, b as StreamTextResult, T as ToolContext, c as Tool, A as AIProvider, d as ActionDefinition, e as ToolDefinition, f as AgentLoopConfig, K as KnowledgeBaseConfig, W as WebSearchConfig, L as LLMAdapter, D as DoneEventMessage, g as StreamEvent, h as ToolCallInfo, i as TokenUsageRaw, M as Message, j as ToolResponse } from './types-C_f95PKp.js';
|
|
2
|
+
export { Q as AdapterFactory, Z as AnthropicProviderConfig, a4 as AnthropicTool, a6 as AnthropicToolResult, a5 as AnthropicToolUse, p as AssistantMessage, a0 as AzureProviderConfig, X as BaseProviderConfig, P as ChatCompletionRequest, ai as Citation, C as CoreMessage, O as DEFAULT_CAPABILITIES, m as DoGenerateParams, n as DoGenerateResult, H as ErrorChunk, F as FilePart, E as FinishChunk, N as FinishReason, ab as GeminiFunctionCall, aa as GeminiFunctionDeclaration, ac as GeminiFunctionResponse, v as GenerateStep, _ as GoogleProviderConfig, I as ImagePart, ad as LLMConfig, k as LanguageModel, l as ModelCapabilities, a2 as OllamaModelOptions, a1 as OllamaProviderConfig, Y as OpenAIProviderConfig, a7 as OpenAITool, a8 as OpenAIToolCall, a9 as OpenAIToolResult, V as ProviderCapabilities, a3 as ProviderFormatter, R as ResponseOptions, x as StreamChunk, w as StreamPart, o as SystemMessage, y as TextDeltaChunk, s as TextPart, J as TokenUsage, t as ToolCall, z as ToolCallChunk, ah as ToolExecution, ae as ToolLocation, q as ToolMessage, u as ToolResult, B as ToolResultChunk, af as UnifiedToolCall, ag as UnifiedToolResult, r as UserContentPart, U as UserMessage, $ as XAIProviderConfig } from './types-C_f95PKp.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import * as hono from 'hono';
|
|
5
5
|
import { Hono } from 'hono';
|
|
@@ -106,6 +106,13 @@ interface ToolConfig<TParams extends z.ZodType, TResult = unknown> {
|
|
|
106
106
|
parameters: TParams;
|
|
107
107
|
/** Function to execute when the tool is called */
|
|
108
108
|
execute: (params: z.infer<TParams>, context: ToolContext) => Promise<TResult>;
|
|
109
|
+
/**
|
|
110
|
+
* Hide this tool's execution from the chat UI.
|
|
111
|
+
* When true, tool calls and results won't be displayed to the user,
|
|
112
|
+
* but the tool will still execute normally.
|
|
113
|
+
* @default false
|
|
114
|
+
*/
|
|
115
|
+
hidden?: boolean;
|
|
109
116
|
}
|
|
110
117
|
/**
|
|
111
118
|
* Create a type-safe tool definition
|
package/dist/index.js
CHANGED