jeffvestal / ElasticDocs_GPT

Combining the search power of Elasticsearch with the Question Answering power of GPT
GNU General Public License v3.0
81 stars 40 forks source link

Error on TransformerModel(hf_model_id, "text_embedding") #1

Open davidsu-citylitics opened 1 year ago

davidsu-citylitics commented 1 year ago

Getting this error on model instantiation

BadRequestError(400, 'x_content_parse_exception', '[1:22] unknown field [text_embedding]')
dynamite-bud commented 9 months ago

Hey, This error can be pretty easily fixed:

Just specify the kwargs in the function:

So, basically call the function like this:

tm = TransformerModel(model_id=hf_model_id, task_type="text_embedding")

I'll make a PR to this repo for solving this issue.