Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"resolutions": {
"**/@babel/parser": "7.24.7",
"**/@hello-pangea/dnd": "18.0.1",
"**/@langchain/core": "^0.3.57",
"**/@langchain/core": "^0.3.80",
"**/@langchain/google-common": "^0.1.8",
"**/@types/node": "22.19.1",
"**/@types/prop-types": "15.7.5",
Expand Down Expand Up @@ -1146,7 +1146,7 @@
"@kbn/zod-helpers": "link:src/platform/packages/shared/kbn-zod-helpers",
"@langchain/aws": "^0.1.3",
"@langchain/community": "^0.3.29",
"@langchain/core": "^0.3.57",
"@langchain/core": "^0.3.80",
"@langchain/google-common": "^0.1.8",
"@langchain/google-genai": "^0.1.8",
"@langchain/google-vertexai": "^0.1.8",
Expand Down Expand Up @@ -1301,7 +1301,7 @@
"jsonwebtoken": "^9.0.2",
"jsts": "^1.6.2",
"kea": "^2.6.0",
"langchain": "^0.3.15",
"langchain": "^0.3.37",
"langsmith": "^0.3.7",
"launchdarkly-js-client-sdk": "^3.8.1",
"load-json-file": "^6.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export const completionChunkToLangchain = (chunk: ChatCompletionChunkEvent): AIM
const toolCallChunks = chunk.tool_calls.map<ToolCallChunk>((toolCall) => {
return {
index: toolCall.index,
id: toolCall.toolCallId,
name: toolCall.function.name,
args: toolCall.function.arguments,
id: toolCall.toolCallId || undefined,
name: toolCall.function.name || undefined,
args: toolCall.function.arguments || undefined,
type: 'tool_call_chunk',
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,12 +584,9 @@ describe('InferenceChatModel', () => {
{ toolCallId: 'my-tool-call-id', index: 0, function: { name: '', arguments: '' } },
],
},
{
tool_calls: [{ toolCallId: '', index: 0, function: { name: 'myfun', arguments: '' } }],
},
{
tool_calls: [
{ toolCallId: '', index: 0, function: { name: 'ction', arguments: ' { "' } },
{ toolCallId: '', index: 0, function: { name: 'myfunction', arguments: ' { "' } },
],
},
{
Expand All @@ -610,7 +607,8 @@ describe('InferenceChatModel', () => {
concatChunk = concatChunk ? concatChunk.concat(chunk) : chunk;
}

expect(allChunks.length).toBe(5);
expect(allChunks.length).toBe(4);

expect(concatChunk!.tool_calls).toEqual([
{
id: 'my-tool-call-id',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,10 @@ export class InferenceChatModel extends BaseChatModel<InferenceChatModelCallOpti
| Runnable<BaseLanguageModelInput, { raw: BaseMessage; parsed: RunOutput }> {
const schema: z.ZodType<RunOutput> | Record<string, any> = outputSchema;
const name = config?.name;
const description = schema.description ?? 'A function available to call.';
const description =
'description' in schema && typeof schema.description === 'string'
? schema.description
: 'A function available to call.';
const includeRaw = config?.includeRaw;

let functionName = name ?? 'extract';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
* 2.0.
*/

import { ActionsClientBedrockChatModel } from './language_models/bedrock_chat';
import { ActionsClientChatOpenAI } from './language_models/chat_openai';
import { ActionsClientLlm } from './language_models/llm';
import { ActionsClientSimpleChatModel } from './language_models/simple_chat_model';
import { ActionsClientGeminiChatModel } from './language_models/gemini_chat';
import { ActionsClientChatVertexAI } from './language_models/chat_vertex';
import { ActionsClientChatBedrockConverse } from './language_models/chat_bedrock_converse';
import { parseBedrockStream } from './utils/bedrock';
Expand All @@ -20,11 +17,8 @@ export {
parseBedrockStream,
parseGeminiResponse,
getDefaultArguments,
ActionsClientBedrockChatModel,
ActionsClientChatOpenAI,
ActionsClientChatVertexAI,
ActionsClientGeminiChatModel,
ActionsClientLlm,
ActionsClientSimpleChatModel,
ActionsClientChatBedrockConverse,
};

This file was deleted.

Loading