string.d.ts 943 B

1234567891011121314151617
  1. import type { InputValues } from "../utils/types/index.js";
  2. import { type StringPromptValueInterface } from "../prompt_values.js";
  3. import { BasePromptTemplate, type TypedPromptInputValues } from "./base.js";
  4. /**
  5. * Base class for string prompt templates. It extends the
  6. * BasePromptTemplate class and overrides the formatPromptValue method to
  7. * return a StringPromptValue.
  8. */
  9. export declare abstract class BaseStringPromptTemplate<RunInput extends InputValues = any, PartialVariableName extends string = any> extends BasePromptTemplate<RunInput, StringPromptValueInterface, PartialVariableName> {
  10. /**
  11. * Formats the prompt given the input values and returns a formatted
  12. * prompt value.
  13. * @param values The input values to format the prompt.
  14. * @returns A Promise that resolves to a formatted prompt value.
  15. */
  16. formatPromptValue(values: TypedPromptInputValues<RunInput>): Promise<StringPromptValueInterface>;
  17. }