@langchain/core
Version:
Core LangChain.js abstractions and schemas
1 lines • 4.56 kB
Source Map (JSON)
{"version":3,"file":"image.d.cts","names":["ContentBlock","ImagePromptValue","ImageContent","InputValues","PartialValues","BasePromptTemplate","BasePromptTemplateInput","TypedPromptInputValues","TemplateFormat","ImagePromptTemplateInput","RunInput","PartialVariableName","Record","ImagePromptTemplate","NewPartialVariableName","FormatOutput","Extract","Exclude","Promise"],"sources":["../../src/prompts/image.d.ts"],"sourcesContent":["import { ContentBlock } from \"../messages/index.js\";\nimport { ImagePromptValue, ImageContent } from \"../prompt_values.js\";\nimport type { InputValues, PartialValues } from \"../utils/types/index.js\";\nimport { BasePromptTemplate, BasePromptTemplateInput, TypedPromptInputValues } from \"./base.js\";\nimport { TemplateFormat } from \"./template.js\";\n/**\n * Inputs to create a {@link ImagePromptTemplate}\n * @augments BasePromptTemplateInput\n */\nexport interface ImagePromptTemplateInput<RunInput extends InputValues = any, PartialVariableName extends string = any> extends BasePromptTemplateInput<RunInput, PartialVariableName> {\n /**\n * The prompt template\n */\n template: Record<string, unknown>;\n /**\n * The format of the prompt template. Options are 'f-string'\n *\n * @defaultValue 'f-string'\n */\n templateFormat?: TemplateFormat;\n /**\n * Whether or not to try validating the template on initialization\n *\n * @defaultValue `true`\n */\n validateTemplate?: boolean;\n /**\n * Additional fields which should be included inside\n * the message content array if using a complex message\n * content.\n */\n additionalContentFields?: ContentBlock;\n}\n/**\n * An image prompt template for a multimodal model.\n */\nexport declare class ImagePromptTemplate<RunInput extends InputValues = any, PartialVariableName extends string = any> extends BasePromptTemplate<RunInput, ImagePromptValue, PartialVariableName> {\n static lc_name(): string;\n lc_namespace: string[];\n template: Record<string, unknown>;\n templateFormat: TemplateFormat;\n validateTemplate: boolean;\n /**\n * Additional fields which should be included inside\n * the message content array if using a complex message\n * content.\n */\n additionalContentFields?: ContentBlock;\n constructor(input: ImagePromptTemplateInput<RunInput, PartialVariableName>);\n _getPromptType(): \"prompt\";\n /**\n * Partially applies values to the prompt template.\n * @param values The values to be partially applied to the prompt template.\n * @returns A new instance of ImagePromptTemplate with the partially applied values.\n */\n partial<NewPartialVariableName extends string>(values: PartialValues<NewPartialVariableName>): Promise<ImagePromptTemplate<InputValues<Exclude<Extract<keyof RunInput, string>, NewPartialVariableName>>, any>>;\n /**\n * Formats the prompt template with the provided values.\n * @param values The values to be used to format the prompt template.\n * @returns A promise that resolves to a string which is the formatted prompt.\n */\n format<FormatOutput = ImageContent>(values: TypedPromptInputValues<RunInput>): Promise<FormatOutput>;\n /**\n * Formats the prompt given the input values and returns a formatted\n * prompt value.\n * @param values The input values to format the prompt.\n * @returns A Promise that resolves to a formatted prompt value.\n */\n formatPromptValue(values: TypedPromptInputValues<RunInput>): Promise<ImagePromptValue>;\n}\n//# sourceMappingURL=image.d.ts.map"],"mappings":";;;;;;;;;;AASA;;AAAwJU,UAAvID,wBAAuIC,CAAAA,iBAA7FP,WAA6FO,GAAAA,GAAAA,EAAAA,4BAAAA,MAAAA,GAAAA,GAAAA,CAAAA,SAAxBJ,uBAAwBI,CAAAA,QAAAA,EAAUC,mBAAVD,CAAAA,CAAAA;EAAUC;;;EAsBpIX,QAAAA,EAlBhBY,MAkBgBZ,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;EAtBkGM;AAAuB;AA2BvJ;;;EAA4JL,cAAAA,CAAAA,EAjBvIO,cAiBuIP;EAAkBU;;;;;EAYpHA,gBAAAA,CAAAA,EAAAA,OAAAA;EAAnCF;;;;;EAO6JK,uBAAAA,CAAAA,EAxBtJd,YAwBsJc;;;;;AAM1JZ,cAzBLW,mBAyBKX,CAAAA,iBAzBgCC,WAyBhCD,GAAAA,GAAAA,EAAAA,4BAAAA,MAAAA,GAAAA,GAAAA,CAAAA,SAzBqGG,kBAyBrGH,CAzBwHQ,QAyBxHR,EAzBkID,gBAyBlIC,EAzBoJS,mBAyBpJT,CAAAA,CAAAA;EAA6CQ,OAAAA,OAAAA,CAAAA,CAAAA,EAAAA,MAAAA;EAAvBH,YA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