Going through the Cross-validate Images and Documents using AIP example from Build with AIP. Corrected the Object Type Imports in functions-typescript/src/index.ts: import { ExampleYn01multiModalOneStateImage, ExampleYn01multiModalOneStatePdf, ExampleYn01multiModalOneStatePdfChunk, ObjectSet } from "@foundry/ontology-api",, and updated the references to them everywhere, leaving searchAroundMultiModalOneStatePdfChunks as is. This is where I made it on the walkthrough/readme.
Then I committed, tagged and released and I got:
Parameter 'r' implicitly has an 'any' type.
private async createEmbedding(text: string): Promise<VectorDouble> {
return Textembeddingada002.createEmbeddings({ inputs: [text] }).then(r => r.type === "ok" ? r.value.embeddings[0] : [])
}
'r' is of type 'unknown'.
}
)).then(r => r.type === "ok" ? r.value.choices[0].message.content! : "Error while running the LLM");
I think it could be related to the other error I got:
Cannot find module '@foundry/languagemodelservice/models' or its corresponding type declarations.
import { VectorDouble } from "@foundry/functions-experimental-api";
import { Gpt4o, Textembeddingada002 } from "@foundry/languagemodelservice/models";
import { GenericMultiModalMessageContent, ChatMessageRole } from "@palantir/languagemodelservice/api"
but I’m not finding that library under Libraries:
Disclaimer for likely dumb question as I just started learning the platform last week, also new to TypeScript.
