UNPKG

@langchain/community

Version:
1 lines • 4.15 kB
{"version":3,"file":"googlevertexai-types.d.ts","names":["BaseLLMParams","GoogleConnectionParams","AuthOptions","GoogleVertexAIConnectionParams","GoogleVertexAIModelParams","GoogleVertexAIBaseLLMInput","GoogleResponse","GoogleVertexAIBasePrediction","GoogleVertexAILLMPredictions","PredictionType","GoogleAbstractedClientOpsMethod","GoogleAbstractedClientOpsResponseType","GoogleAbstractedClientOps","GoogleAbstractedClient","Promise"],"sources":["../../src/types/googlevertexai-types.d.ts"],"sourcesContent":["import type { BaseLLMParams } from \"@langchain/core/language_models/llms\";\nexport interface GoogleConnectionParams<AuthOptions> {\n authOptions?: AuthOptions;\n}\nexport interface GoogleVertexAIConnectionParams<AuthOptions> extends GoogleConnectionParams<AuthOptions> {\n /** Hostname for the API call */\n endpoint?: string;\n /** Region where the LLM is stored */\n location?: string;\n /** The version of the API functions. Part of the path. */\n apiVersion?: string;\n /**\n * If you are planning to connect to a model that lives under a custom endpoint\n * provide the \"customModelURL\" which will override the automatic URL building\n *\n * This is necessary in cases when you want to point to a fine-tuned model or\n * a model that has been hidden under VertexAI Endpoints.\n *\n * In those cases, specifying the `GoogleVertexAIModelParams.model` param\n * will not be necessary and will be ignored.\n *\n * @see GoogleVertexAILLMConnection.buildUrl\n * */\n customModelURL?: string;\n}\nexport interface GoogleVertexAIModelParams {\n /** Model to use */\n model?: string;\n /** Sampling temperature to use */\n temperature?: number;\n /**\n * Maximum number of tokens to generate in the completion.\n */\n maxOutputTokens?: number;\n /**\n * Top-p changes how the model selects tokens for output.\n *\n * Tokens are selected from most probable to least until the sum\n * of their probabilities equals the top-p value.\n *\n * For example, if tokens A, B, and C have a probability of\n * .3, .2, and .1 and the top-p value is .5, then the model will\n * select either A or B as the next token (using temperature).\n */\n topP?: number;\n /**\n * Top-k changes how the model selects tokens for output.\n *\n * A top-k of 1 means the selected token is the most probable among\n * all tokens in the model’s vocabulary (also called greedy decoding),\n * while a top-k of 3 means that the next token is selected from\n * among the 3 most probable tokens (using temperature).\n */\n topK?: number;\n}\nexport interface GoogleVertexAIBaseLLMInput<AuthOptions> extends BaseLLMParams, GoogleVertexAIConnectionParams<AuthOptions>, GoogleVertexAIModelParams {\n}\nexport interface GoogleResponse {\n data: any;\n}\nexport interface GoogleVertexAIBasePrediction {\n safetyAttributes?: any;\n}\nexport interface GoogleVertexAILLMPredictions<PredictionType extends GoogleVertexAIBasePrediction> {\n predictions: PredictionType[];\n}\nexport type GoogleAbstractedClientOpsMethod = \"GET\" | \"POST\";\nexport type GoogleAbstractedClientOpsResponseType = \"json\" | \"stream\";\nexport type GoogleAbstractedClientOps = {\n url?: string;\n method?: GoogleAbstractedClientOpsMethod;\n data?: unknown;\n responseType?: GoogleAbstractedClientOpsResponseType;\n};\nexport interface GoogleAbstractedClient {\n request: (opts: GoogleAbstractedClientOps) => unknown;\n getProjectId: () => Promise<string>;\n}\n//# sourceMappingURL=googlevertexai-types.d.ts.map"],"mappings":";;;UACiBC;gBACCC;AADlB;AAGiBC,UAAAA,8BAA8BD,CAAAA,WAAAA,CAAA,SAAsBD,sBAAAA,CAAuBC,WAAD,CAAA,CAAA;EAqB1EE;EA8BAC,QAAAA,CAAAA,EAAAA,MAAAA;EAA8FH;EAA9CF,QAAAA,CAAAA,EAAAA,MAAAA;EAAeG;EAA6CC,UAAAA,CAAAA,EAAAA,MAAAA;EAAyB;AAEtJ;AAGA;AAGA;AAGA;AACA;AACA;AAMA;;;;;;;UAjDiBA,yBAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA8BAC,gDAAgDL,eAAeG,+BAA+BD,cAAcE;UAE5GE,cAAAA;;;UAGAC,4BAAAA;;;UAGAC,oDAAoDD;eACpDE;;KAELC,+BAAAA;KACAC,qCAAAA;KACAC,yBAAAA;;WAECF;;iBAEMC;;UAEFE,sBAAAA;kBACGD;sBACIE"}