@langchain/core
Version:
Core LangChain.js abstractions and schemas
27 lines (25 loc) • 1.16 kB
TypeScript
import { InputValues } from "../utils/types/index.js";
import { StringPromptValueInterface } from "../prompt_values.js";
import { BasePromptTemplate, TypedPromptInputValues } from "./base.js";
//#region src/prompts/string.d.ts
/**
* Base class for string prompt templates. It extends the
* BasePromptTemplate class and overrides the formatPromptValue method to
* return a StringPromptValue.
*/
declare abstract class BaseStringPromptTemplate<
// eslint-disable-next-line @typescript-eslint/no-explicit-any
RunInput extends InputValues = any,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
PartialVariableName extends string = any> extends BasePromptTemplate<RunInput, StringPromptValueInterface, PartialVariableName> {
/**
* Formats the prompt given the input values and returns a formatted
* prompt value.
* @param values The input values to format the prompt.
* @returns A Promise that resolves to a formatted prompt value.
*/
formatPromptValue(values: TypedPromptInputValues<RunInput>): Promise<StringPromptValueInterface>;
}
//#endregion
export { BaseStringPromptTemplate };
//# sourceMappingURL=string.d.ts.map