mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
cdd0199e8f
- Replace `TotalTokenCount` with `EmbeddingTokenCount` in `ImportDocumentResponse`. - Add `OriginalQuestion` and `ReformulatedQuestion` fields to `QuestionResponse` and a new constructor. - Add a new constructor to `TokenUsageResponse` to initialize `Question`. - Add `TextChunkerService` to service collection in `Program.cs`. - Clarify prompt and update token counting in `ChatService`. - Differentiate token counting in `TokenizerService` with `CountChatCompletionTokens` and `CountEmbeddingTokens`. - Update `VectorSearchService` to use `TextChunkerService` and new token counting methods. - Introduce `TextChunkerService` for text splitting and tokenization.
10 lines
490 B
C#
10 lines
490 B
C#
namespace SqlDatabaseVectorSearch.Models;
|
|
|
|
// Question and Answer can be null when using response streaming.
|
|
public record class QuestionResponse(string? OriginalQuestion, string? ReformulatedQuestion, string? Answer, StreamState? StreamState = null, TokenUsageResponse? TokenUsage = null)
|
|
{
|
|
public QuestionResponse(string? token, StreamState streamState, TokenUsageResponse? tokenUsageResponse = null)
|
|
: this(null, null, token, streamState, tokenUsageResponse)
|
|
{
|
|
}
|
|
} |