Open barry91-acn opened 3 weeks ago
I just find an relevant info for the issue about SAP CDS sub.modules
Imports from @sap/cds/apis/... are no longer supported! As a consequence of the above, always only import @sap/cds APIs, while imports from @sap/cds/apis/... were always wrong and don't work any longer with cds8: import { Service } from '@sap/cds' import { Service } from '@sap/cds/apis/services' // WRONG! As already rolled out in December 23, imports references to undocumented .d.ts files, as in line 2 above, was never documented, hence always wrong. While we still supported them for a grace period since then, this grace period ends with cds8.
So this first error disappeared after adjustments indicated here: https://cap.cloud.sap/docs/releases/jun24
Unfortunately I'm facing the following issues. I already updated langchain and sap-cloud-sdk libraries.
Do you face the same?
Just for your info: I already builded successfully without any issue a version of this repository of June/July. This is why I think something is changed around library. But honestly now I do not understand what's needed to update/change in order to complete the build.
.........
......srv/rag-service.ts(2,25): error TS2307: Cannot find module '@sap/cds/apis/services' or its corresponding type declarations. srv/rag-service.ts(8,8): error TS2307: Cannot find module 'langchain/prompts' or its corresponding type declarations. srv/rag-service.ts(111,13): error TS2322: Type 'BTPAzureOpenAIChatLLM' is not assignable to type 'LLMType'. Type 'BTPAzureOpenAIChatLLM' is missing the following properties from type 'BaseLanguageModelInterface<any, BaseLanguageModelCallOptions>': callKeys, generatePrompt, predict, predictMessages, and 11 more. srv/rag-service.ts(176,13): error TS2322: Type 'BTPAzureOpenAIChatLLM' is not assignable to type 'LLMType'. Type 'BTPAzureOpenAIChatLLM' is missing the following properties from type 'BaseLanguageModelInterface<any, BaseLanguageModelCallOptions>': callKeys, generatePrompt, predict, predictMessages, and 11 more. srv/utils/langchain/BTPAzureOpenAIChatLLM.ts(1,51): error TS2307: Cannot find module 'langchain/chat_models/openai' or its corresponding type declarations. srv/utils/langchain/BTPAzureOpenAIChatLLM.ts(2,42): error TS2307: Cannot find module 'langchain/dist/types/openai-types' or its corresponding type declarations. srv/utils/langchain/BTPEmbedding.ts(1,46): error TS2307: Cannot find module 'langchain/embeddings/base' or its corresponding type declarations. .[2024-10-17 12:58:58] ERROR the "before-all"" build failed: could not execute the "npm run build:cf --prefix api" command: exit status 2 make: *** [Makefile_20241017125755.mta:28: pre_build] Error 1 [2024-10-17 12:58:58] ERROR could not build the MTA project: could not execute the "make -f Makefile_20241017125755.mta p=cf mtar=citizen-genai-rag_0.0.1.mtar strict=true mode= t=\"./mta_archives\"" command: exit status 2
This is the section in which there are issues within the repository code:
Thanks in advance for the collaboration. Best regards, Andrea