Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public async Task<AskAiGatewayResponse> AskAi(AskAiRequest askAiRequest, Cancel
}

public record LlmGatewayRequest(
AgentOptions AgentOptions,
UserContext UserContext,
PlatformContext PlatformContext,
ChatInput[] Input,
Expand All @@ -64,11 +65,11 @@ string ThreadId
{
public static LlmGatewayRequest CreateFromRequest(AskAiRequest request, Guid conversationId) =>
new(
AgentOptions: new AgentOptions(FirstGenerationTimeout: 60000),
UserContext: new UserContext("elastic-docs-v3@invalid"),
PlatformContext: new PlatformContext("docs_site", "docs_assistant", []),
Input:
[
// new ChatInput("user", AskAiRequest.SystemPrompt),
new ChatInput("user", request.Message)
],
ThreadId: conversationId.ToString()
Expand All @@ -77,6 +78,8 @@ public static LlmGatewayRequest CreateFromRequest(AskAiRequest request, Guid con

public record UserContext(string UserEmail);

public record AgentOptions(int FirstGenerationTimeout);

public record PlatformContext(
string Origin,
string UseCase,
Expand Down
Loading