Skip to content

Commit

Permalink
Merge branch 'feature/chat-span' of private:sdcb/chats into feature/c…
Browse files Browse the repository at this point in the history
…hat-span
  • Loading branch information
greywen committed Dec 23, 2024
2 parents fd0ac0d + e3e02cd commit 906292c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
5 changes: 5 additions & 0 deletions src/BE/Controllers/Chats/Chats/ChatController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public async Task<IActionResult> StartConversationStreamed(
[FromServices] FileUrlProvider fup,
CancellationToken cancellationToken)
{
if (!ModelState.IsValid)
{
return BadRequest(ModelState);
}

long firstTick = Stopwatch.GetTimestamp();
DecryptedChatRequest req = request.Decrypt(idEncryption);

Expand Down
2 changes: 1 addition & 1 deletion src/BE/Controllers/Chats/Chats/Dtos/ChatRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public record ChatSpanRequest
[JsonPropertyName("spanId")]
public required byte Id { get; init; }

[JsonPropertyName("prompt")]
[JsonPropertyName("systemPrompt")]
public required string? SystemPrompt { get; init; }

public bool SystemPromptValid => !string.IsNullOrEmpty(SystemPrompt);
Expand Down
Loading

0 comments on commit 906292c

Please sign in to comment.