@langchain/core
Version:
Core LangChain.js abstractions and schemas
1 lines • 3.84 kB
Source Map (JSON)
{"version":3,"file":"structured.d.ts","names":["ChatPromptValueInterface","RunnableLike","Runnable","RunnableConfig","InputValues","BaseMessagePromptTemplateLike","ChatPromptTemplate","ChatPromptTemplateInput","StructuredPromptInput","RunInput","PartialVariableName","Record","StructuredPrompt","NewRunOutput","Error","Exclude"],"sources":["../../src/prompts/structured.d.ts"],"sourcesContent":["import { ChatPromptValueInterface } from \"../prompt_values.js\";\nimport { RunnableLike, Runnable } from \"../runnables/base.js\";\nimport { RunnableConfig } from \"../runnables/config.js\";\nimport { InputValues } from \"../utils/types/index.js\";\nimport { BaseMessagePromptTemplateLike, ChatPromptTemplate, ChatPromptTemplateInput } from \"./chat.js\";\n/**\n * Interface for the input of a ChatPromptTemplate.\n */\nexport interface StructuredPromptInput<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nRunInput extends InputValues = any, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nPartialVariableName extends string = any> extends ChatPromptTemplateInput<RunInput, PartialVariableName> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n schema: Record<string, any>;\n method?: \"jsonMode\" | \"jsonSchema\" | \"functionMode\";\n}\nexport declare class StructuredPrompt<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nRunInput extends InputValues = any, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nPartialVariableName extends string = any> extends ChatPromptTemplate<RunInput, PartialVariableName> implements StructuredPromptInput<RunInput, PartialVariableName> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n schema: Record<string, any>;\n method?: \"jsonMode\" | \"jsonSchema\" | \"functionMode\";\n lc_namespace: string[];\n get lc_aliases(): Record<string, string>;\n constructor(input: StructuredPromptInput<RunInput, PartialVariableName>);\n pipe<NewRunOutput>(coerceable: RunnableLike<ChatPromptValueInterface, NewRunOutput>): Runnable<RunInput, Exclude<NewRunOutput, Error>, RunnableConfig>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static fromMessagesAndSchema<RunInput extends InputValues = any>(promptMessages: (ChatPromptTemplate<InputValues, string> | BaseMessagePromptTemplateLike)[], schema: StructuredPromptInput[\"schema\"], method?: \"jsonMode\" | \"jsonSchema\" | \"functionMode\"\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): ChatPromptTemplate<RunInput, any>;\n}\n"],"mappings":";;;;;;;;;;AAQA;AAAsC,UAArBQ,qBAAqB;;iBAErBJ,WAEyDK,GAAAA,GAAAA;;4BAE9DE,MAAAA,GAAAA,GAAAA,CAAAA,SAFsCJ,uBAEtCI,CAF8DF,QAE9DE,EAFwED,mBAExEC,CAAAA,CAAAA;EAAM;EAFuD,MAAA,EAE7DA,MAF6D,CAAA,MAAA,EAAA,GAAA,CAAA;EAKpDC,MAAAA,CAAAA,EAAAA,UAAgB,GAAA,YAAA,GAAA,cAAA;;AAEpBR,cAFIQ,gBAEJR;;iBAAAA,WAE8DM,GAAAA,GAAAA;;4BAAgEA,MAAAA,GAAAA,GAAAA,CAAAA,SAA7FJ,kBAA6FI,CAA1ED,QAA0EC,EAAhEA,mBAAgEA,CAAAA,YAAhCF,qBAAgCE,CAAVD,QAAUC,EAAAA,mBAAAA,CAAAA,CAAAA;EAAmB;EAEhJ,MAGIC,EAHVA,MAGUA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;EAAM,MACiBF,CAAAA,EAAAA,UAAAA,GAAAA,YAAAA,GAAAA,cAAAA;EAAQ,YAAEC,EAAAA,MAAAA,EAAAA;EAAmB,IAAnDF,UAAAA,CAAAA,CAAAA,EADDG,MACCH,CAAAA,MAAAA,EAAAA,MAAAA,CAAAA;EAAqB,WACIR,CAAAA,KAAAA,EADzBQ,qBACyBR,CADHS,QACGT,EADOU,mBACPV,CAAAA;EAAwB,IAAEa,CAAAA,YAAAA,CAAAA,CAAAA,UAAAA,EAAvCZ,YAAuCY,CAA1Bb,wBAA0Ba,EAAAA,YAAAA,CAAAA,CAAA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