Skip to content

Commit d2d464e

Browse files
committed
Increase FirstGenerationTimeout from 10s (default) to 60s
1 parent dc9ed92 commit d2d464e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/api/Elastic.Documentation.Api.Infrastructure/Adapters/AskAi/LlmGatewayAskAiGateway.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public async Task<AskAiGatewayResponse> AskAi(AskAiRequest askAiRequest, Cancel
5656
}
5757

5858
public record LlmGatewayRequest(
59+
AgentOptions AgentOptions,
5960
UserContext UserContext,
6061
PlatformContext PlatformContext,
6162
ChatInput[] Input,
@@ -64,11 +65,11 @@ string ThreadId
6465
{
6566
public static LlmGatewayRequest CreateFromRequest(AskAiRequest request, Guid conversationId) =>
6667
new(
68+
AgentOptions: new AgentOptions(FirstGenerationTimeout: 60000),
6769
UserContext: new UserContext("elastic-docs-v3@invalid"),
6870
PlatformContext: new PlatformContext("docs_site", "docs_assistant", []),
6971
Input:
7072
[
71-
// new ChatInput("user", AskAiRequest.SystemPrompt),
7273
new ChatInput("user", request.Message)
7374
],
7475
ThreadId: conversationId.ToString()
@@ -77,6 +78,8 @@ public static LlmGatewayRequest CreateFromRequest(AskAiRequest request, Guid con
7778

7879
public record UserContext(string UserEmail);
7980

81+
public record AgentOptions(int FirstGenerationTimeout);
82+
8083
public record PlatformContext(
8184
string Origin,
8285
string UseCase,

0 commit comments

Comments
 (0)