Skip to content

Commit

Permalink
Fix LanguageModelToolCallPart arguments order (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens authored Oct 10, 2024
1 parent b844bb6 commit 4822210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/base/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export * from './tracer';
export * from './tsx-globals';
export * from './types';

export { AssistantMessage, FunctionMessage, PrioritizedList, PrioritizedListProps, SystemMessage, TextChunk, TextChunkProps, UserMessage, LegacyPrioritization, Chunk } from './promptElements';
export { AssistantMessage, Chunk, FunctionMessage, LegacyPrioritization, PrioritizedList, PrioritizedListProps, SystemMessage, TextChunk, TextChunkProps, UserMessage } from './promptElements';

export { PromptElement } from './promptElement';
export { MetadataMap, PromptRenderer, QueueItem, RenderPromptResult } from './promptRenderer';
Expand Down Expand Up @@ -168,7 +168,7 @@ export function toVsCodeChatMessages(messages: ChatMessage[]) {
const message: LanguageModelChatMessage = vscode.LanguageModelChatMessage.Assistant(m.content, m.name);
if (m.tool_calls) {
message.content2 = [m.content];
message.content2.push(...m.tool_calls.map(tc => new vscode.LanguageModelToolCallPart(tc.function.name, tc.function.arguments, tc.id)));
message.content2.push(...m.tool_calls.map(tc => new vscode.LanguageModelToolCallPart(tc.function.name, tc.id, tc.function.arguments)));
}
return message;
case ChatRole.User:
Expand Down

0 comments on commit 4822210

Please sign in to comment.