embedJs
embedJs copied to clipboard
I'm unsure how to run a model that needs inputs
const ragApplication = await new RAGApplicationBuilder()
.setModel(new HuggingFace({ modelName: 'timpal0l/mdeberta-v3-base-squad2'}))
.setQueryTemplate('')
.setVectorDb(new PineconeDb({
projectName: 'test',
namespace: 'dev',
indexSpec: {
serverless: {
cloud: 'aws',
region: 'us-east-1',
},
},
}))
.setCache(new LmdbCache({ path: path.resolve('./cache') }))
.setTemperature(0.01) // closer to 1 = more creative. Closer to 0 = more deterministic
.setSearchResultCount(100) // hwow much to get from the db
.build();
const query = await ragApplication.query('What is Tesla?');
Given this model and many other models on HuggingFace the output error is
Error: Error in `inputs`: value is not a valid dict
at request
While I can see the error is from Hugging Face, it's unclear how I would provide the correct inputs in a case like this.
Any help is greatly appreciated!