mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 16:30:27 +00:00
27 lines
No EOL
857 B
TypeScript
27 lines
No EOL
857 B
TypeScript
import { AITool } from "Enums/AITool";
|
|
|
|
// platform agnostic function call class used to execute the requested function
|
|
export class AIToolCall {
|
|
public readonly name: AITool;
|
|
public readonly arguments: Record<string, unknown>;
|
|
public readonly toolId?: string;
|
|
public readonly thoughtSignature?: string;
|
|
|
|
constructor(name: AITool, args: Record<string, unknown>, toolId?: string, thoughtSignature?: string) {
|
|
this.name = name;
|
|
this.arguments = args;
|
|
this.toolId = toolId;
|
|
this.thoughtSignature = thoughtSignature;
|
|
}
|
|
|
|
public toConversationString() {
|
|
return JSON.stringify({
|
|
toolCall: {
|
|
name: this.name,
|
|
args: this.arguments,
|
|
id: this.toolId,
|
|
thoughtSignature: this.thoughtSignature
|
|
}
|
|
});
|
|
}
|
|
} |