Skip to content

Commit f8e6f38

Browse files
author
Oceania2018
committed
Add SetTaskType to ITextEmbedding
1 parent 014d98a commit f8e6f38

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/Infrastructure/BotSharp.Abstraction/MLTasks/ITextEmbedding.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ public interface ITextEmbedding
1313
string? ApiKey => null;
1414
void SetApiKey(string apiKey) { }
1515

16+
/// <summary>
17+
/// Optional task/prompt hint for prompt-conditioned ("asymmetric") embedding models such as
18+
/// EmbeddingGemma, which embed a search query and a stored document with different prompt prefixes.
19+
/// Pass <c>"query"</c> when embedding a search query and <c>"document"</c> when embedding content to
20+
/// be stored/indexed. Symmetric providers (e.g. OpenAI) ignore this. Defaults to <c>"document"</c>.
21+
/// </summary>
22+
void SetTaskType(string taskType) { }
23+
1624
/// <summary>
1725
/// Generates an embedding vector for the given text.
1826
/// </summary>

0 commit comments

Comments
 (0)