From b37f9761888b20f31de09a807dbb7d8b81742334 Mon Sep 17 00:00:00 2001 From: Steph Milovic Date: Thu, 5 Dec 2024 12:20:06 -0700 Subject: [PATCH] reverts --- .../kbn-langchain/server/language_models/chat_openai.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/packages/kbn-langchain/server/language_models/chat_openai.ts b/x-pack/packages/kbn-langchain/server/language_models/chat_openai.ts index 5dd48912a2e0e..5e2cb5434b24e 100644 --- a/x-pack/packages/kbn-langchain/server/language_models/chat_openai.ts +++ b/x-pack/packages/kbn-langchain/server/language_models/chat_openai.ts @@ -63,7 +63,7 @@ export class ActionsClientChatOpenAI extends ChatOpenAI { #logger: Logger; #actionResultData: string; #traceId: string; - #signal: AbortSignal; + #signal?: AbortSignal; #timeout?: number; constructor({ @@ -102,7 +102,7 @@ export class ActionsClientChatOpenAI extends ChatOpenAI { this.#timeout = timeout; this.#actionResultData = ''; this.streaming = streaming; - this.#signal = signal ?? new AbortController().signal; + this.#signal = signal; this.model = model ?? DEFAULT_OPEN_AI_MODEL; // to be passed to the actions client this.#temperature = temperature; @@ -140,7 +140,6 @@ export class ActionsClientChatOpenAI extends ChatOpenAI { | OpenAI.ChatCompletionCreateParamsNonStreaming ): Promise | OpenAI.ChatCompletion> { return this.caller.call(async () => { - console.log('==> this.llmType', this.llmType); const requestBody = this.formatRequestForActionsClient(completionRequest, this.llmType); this.#logger.debug( () =>