UNPKG

@agentica/core

Version:

Agentic AI Library specialized in LLM Function Calling

19 lines (16 loc) 569 B
import type { ILlmSchema } from "@samchon/openapi"; import type { AgenticaOperation } from "../context/AgenticaOperation"; import type { AgenticaOperationSelection } from "../context/AgenticaOperationSelection"; export function createOperationSelection<Model extends ILlmSchema.Model>(props: { operation: AgenticaOperation<Model>; reason: string; }): AgenticaOperationSelection<Model> { return { operation: props.operation, reason: props.reason, toJSON: () => ({ operation: props.operation.toJSON(), reason: props.reason, }), }; }