From 6c5f045cd1315ed4ee88ecbce3e0236c42734de9 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Mon, 2 Sep 2024 15:40:19 +0200 Subject: [PATCH] feat: remove modules index file --- src/adapters/bam/llm.ts | 2 +- src/adapters/langchain/llms/index.ts | 17 ----------------- src/adapters/langchain/llms/llm.ts | 2 +- src/adapters/ollama/llm.ts | 2 +- src/adapters/watsonx/llm.ts | 2 +- src/llms/index.ts | 17 ----------------- src/memory/summarizeMemory.ts | 2 +- src/tools/python/python.ts | 2 +- 8 files changed, 6 insertions(+), 40 deletions(-) delete mode 100644 src/adapters/langchain/llms/index.ts delete mode 100644 src/llms/index.ts diff --git a/src/adapters/bam/llm.ts b/src/adapters/bam/llm.ts index 42da6224..e5a23b14 100644 --- a/src/adapters/bam/llm.ts +++ b/src/adapters/bam/llm.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { LLM, LLMInput } from "@/llms/index.js"; +import { LLM, LLMInput } from "@/llms/llm.js"; import { AsyncStream, BaseLLMOutput, diff --git a/src/adapters/langchain/llms/index.ts b/src/adapters/langchain/llms/index.ts deleted file mode 100644 index 6831bc63..00000000 --- a/src/adapters/langchain/llms/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright 2024 IBM Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export * from "./llm.js"; diff --git a/src/adapters/langchain/llms/llm.ts b/src/adapters/langchain/llms/llm.ts index 51cb527b..8188a4e6 100644 --- a/src/adapters/langchain/llms/llm.ts +++ b/src/adapters/langchain/llms/llm.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { LLM, LLMInput } from "@/llms/index.js"; +import { LLM, LLMInput } from "@/llms/llm.js"; import { BaseLLM as LCBaseLLM } from "@langchain/core/language_models/llms"; import { AsyncStream, diff --git a/src/adapters/ollama/llm.ts b/src/adapters/ollama/llm.ts index 6f5d24bb..3691f352 100644 --- a/src/adapters/ollama/llm.ts +++ b/src/adapters/ollama/llm.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { LLM, LLMInput } from "@/llms/index.js"; +import { LLM, LLMInput } from "@/llms/llm.js"; import { Emitter } from "@/emitter/emitter.js"; import { AsyncStream, diff --git a/src/adapters/watsonx/llm.ts b/src/adapters/watsonx/llm.ts index e087ffcd..2b54395f 100644 --- a/src/adapters/watsonx/llm.ts +++ b/src/adapters/watsonx/llm.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { LLM, LLMInput } from "@/llms/index.js"; +import { LLM, LLMInput } from "@/llms/llm.js"; import { AsyncStream, BaseLLMOutput, diff --git a/src/llms/index.ts b/src/llms/index.ts deleted file mode 100644 index 6831bc63..00000000 --- a/src/llms/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright 2024 IBM Corp. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export * from "./llm.js"; diff --git a/src/memory/summarizeMemory.ts b/src/memory/summarizeMemory.ts index aae39ab7..861c3c98 100644 --- a/src/memory/summarizeMemory.ts +++ b/src/memory/summarizeMemory.ts @@ -17,7 +17,7 @@ import { BaseMessage } from "@/llms/primitives/message.js"; import { BaseMemory } from "@/memory/base.js"; import { PromptTemplate } from "@/template.js"; -import { LLM } from "@/llms/index.js"; +import { LLM } from "@/llms/llm.js"; import { BaseLLMOutput } from "@/llms/base.js"; import { shallowCopy } from "@/serializer/utils.js"; diff --git a/src/tools/python/python.ts b/src/tools/python/python.ts index f2c8533b..8995f40f 100644 --- a/src/tools/python/python.ts +++ b/src/tools/python/python.ts @@ -26,7 +26,7 @@ import { PromiseClient, createPromiseClient } from "@connectrpc/connect"; import { CodeInterpreterService } from "bee-proto/code_interpreter/v1/code_interpreter_service_connect"; import { z } from "zod"; import { BaseLLMOutput } from "@/llms/base.js"; -import { LLM } from "@/llms/index.js"; +import { LLM } from "@/llms/llm.js"; import { PromptTemplate } from "@/template.js"; import { differenceWith, isShallowEqual, isTruthy, mapToObj, unique } from "remeda"; import { PythonStorage } from "@/tools/python/storage.js";