Skip to content

Commit

Permalink
Merge pull request #170 from forcedotcom/mz/jsonschema-callLLM
Browse files Browse the repository at this point in the history
feat: add json_schema as parameter to call LLM
  • Loading branch information
mingxuanzhangsfdx authored Feb 14, 2025
2 parents 4e44e80 + ea9be01 commit 046137a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/types/llmService/LLMService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,24 @@ export interface LLMServiceInterface {
* @param engineeredPrompt - The prompt that has been engineered for the LLM.
* @param promptId - The ID of the prompt (optional).
* @param outputTokenLimit - The limit on the number of output tokens (optional).
* @param options - The object of other options in the request (optional)
* @returns A promise that resolves to the LLM's response as a string.
*/
callLLM(
engineeredPrompt: string,
promptId?: string,
outputTokenLimit?: number
outputTokenLimit?: number,
options?: CallLLMOptions
): Promise<string>;
}

export type CallLLMOptions = {
// Values to be added to the parameters property on the request.
parameters?: {
guided_json?: string; // TODO: define the type in detail
};
// Properties to be added to the body of the request.
properties?: {
stop_sequence?: string[]; // TODO: define the type in detail
};
};

0 comments on commit 046137a

Please sign in to comment.