Skip to content

Commit

Permalink
Fix/embedding disabled bug (#19)
Browse files Browse the repository at this point in the history
* fix(config):  embedding disabled bug

* update version
  • Loading branch information
xbotter authored Aug 10, 2023
1 parent 8229258 commit 306ce86
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.0.0</AvaloniaVersion>
<Version>0.3.0</Version>
<Version>0.3.1</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
8 changes: 4 additions & 4 deletions PromptPlayground/ViewModels/ConfigViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ public ILLMConfigViewModel GetLLM()
return this.SelectedModel;
}

public IVectorDbConfigViewModel GetVectorDb()
public IVectorDbConfigViewModel? GetVectorDb()
{
return this.SelectedVectorDb;
return this.EnableVectorDB ? this.SelectedVectorDb : null;
}

public IEmbeddingConfigViewModel GetEmbedding()
public IEmbeddingConfigViewModel? GetEmbedding()
{
return this.SelectedEmbedding;
return this.EnableVectorDB ? this.SelectedEmbedding : null;
}

public ConfigViewModel(bool requireLoadConfig = false) : this()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public interface IConfigAttributesProvider
{
IList<ConfigAttribute> AllAttributes { get; }
ILLMConfigViewModel GetLLM();
IVectorDbConfigViewModel GetVectorDb();
IEmbeddingConfigViewModel GetEmbedding();
IVectorDbConfigViewModel? GetVectorDb();
IEmbeddingConfigViewModel? GetEmbedding();
}

public class ConfigAttribute : ObservableObject
Expand Down

0 comments on commit 306ce86

Please sign in to comment.