dotnet-smartcomponents / smartcomponents

Experimental, end-to-end AI features for .NET apps
622 stars 54 forks source link

How Can I Set LocalEmbeddingsModelName and LocalEmbeddingsModelPath #33

Closed yougdlek closed 3 months ago

yougdlek commented 3 months ago

Hello, the component you made is working well. Currently, I am in an offline environment and cannot download the model from the hugging face.

file path like this : "D:\source\repo\ComponentTest\wwwroot\model.onnx"

I need to set the LocalEmbeddingsModelName and LocalEmbeddingsModelPath options. Can you help me on which file I should set them in?

SteveSandersonMS commented 3 months ago

In your .csproj file, add:

<PropertyGroup>
    <LocalEmbeddingsModelPath>full path to the model.onnx file</LocalEmbeddingsModelPath>
    <LocalEmbeddingsVocabPath>full path to the vocab.txt file</LocalEmbeddingsVocabPath>
</PropertyGroup>

That should do it but please let us know if not!