add authentication support
This commit is contained in:
51
dist/auth/JLINCAuthBaseChatModel.d.ts
vendored
Normal file
51
dist/auth/JLINCAuthBaseChatModel.d.ts
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
export type JLINCConfig = import("./common").JLINCConfig;
|
||||
export type JLINCAuthBaseChatModelFields = {
|
||||
config: JLINCConfig;
|
||||
jlincAuthDecision: Tool;
|
||||
targetAuthorized: BaseChatModel;
|
||||
targetNotAuthorized: BaseChatModel | null;
|
||||
};
|
||||
/**
|
||||
* @typedef {import('./common').JLINCConfig} JLINCConfig
|
||||
*/
|
||||
/**
|
||||
* @typedef {Object} JLINCAuthBaseChatModelFields
|
||||
* @property {JLINCConfig} config
|
||||
* @property {Tool} jlincAuthDecision
|
||||
* @property {BaseChatModel} targetAuthorized
|
||||
* @property {BaseChatModel|null} targetNotAuthorized
|
||||
*/
|
||||
export class JLINCAuthBaseChatModel extends BaseChatModel<import("@langchain/core/language_models/chat_models").BaseChatModelCallOptions, import("@langchain/core/dist/messages/ai.js").AIMessageChunk> {
|
||||
/**
|
||||
* @param {JLINCAuthBaseChatModelFields} fields
|
||||
*/
|
||||
constructor({ config, jlincAuthDecision, targetAuthorized, targetNotAuthorized }: JLINCAuthBaseChatModelFields);
|
||||
/** @type {JLINCConfig} */
|
||||
config: JLINCConfig;
|
||||
/** @type {Tool} */
|
||||
jlincAuthDecision: Tool;
|
||||
/** @type {BaseChatModel} */
|
||||
targetAuthorized: BaseChatModel;
|
||||
/** @type {BaseChatModel|null} */
|
||||
targetNotAuthorized: BaseChatModel | null;
|
||||
/** @type {JLINCTracer} */
|
||||
tracer: JLINCTracer;
|
||||
/** @type {string} */
|
||||
authType: string;
|
||||
/**
|
||||
* @param {BindToolsInput[]} tools - The tools to bind to the underlying models.
|
||||
* @param {Partial<CallOptions>} [kwargs] - Optional call options.
|
||||
* @returns {Runnable<BaseLanguageModelInput, OutputMessageType, CallOptions>}
|
||||
* A new JLINCAuthBaseChatModel instance whose underlying models
|
||||
* have been bound with the provided tools.
|
||||
*/
|
||||
bindTools(tools: BindToolsInput[], kwargs?: Partial<CallOptions>): Runnable<BaseLanguageModelInput, OutputMessageType, CallOptions>;
|
||||
/**
|
||||
* @param {BaseLanguageModelInput} input
|
||||
* @param {Partial<CallOptions>} [options] - Optional call options.
|
||||
* @returns {Promise<OutputMessageType>} A promise that resolves with the output.
|
||||
*/
|
||||
invoke(input: BaseLanguageModelInput, runManager: any): Promise<OutputMessageType>;
|
||||
}
|
||||
import { BaseChatModel } from "@langchain/core/dist/language_models/chat_models.js";
|
||||
import { JLINCTracer } from "../tracer/index.js";
|
||||
Reference in New Issue
Block a user