Skip to content

Commit

Permalink
Update polling endpoint for external orchestration services
Browse files Browse the repository at this point in the history
  • Loading branch information
ciprianjichici committed Sep 19, 2024
1 parent 96a96c3 commit 39e6d65
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dotnet/Orchestration/Services/LLMOrchestrationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public async Task<LLMCompletionResponse> GetCompletion(string instanceId, LLMCom
var pollingClient = new PollingHttpClient<LLMCompletionRequest, LLMCompletionResponse>(
client,
request,
$"instances/{instanceId}/completions",
$"instances/{instanceId}/async-completions",
TimeSpan.FromSeconds(10),
client.Timeout.Subtract(TimeSpan.FromSeconds(1)),
_logger);
Expand All @@ -77,14 +77,16 @@ public async Task<LLMCompletionResponse> GetCompletion(string instanceId, LLMCom
return new LLMCompletionResponse
{
OperationId = request.OperationId,
Content = completionResponse!.Content,
Completion = completionResponse.Completion,
Citations = completionResponse.Citations,
UserPrompt = completionResponse.UserPrompt,
FullPrompt = completionResponse.FullPrompt,
PromptTemplate = string.Empty,
AgentName = request.Agent.Name,
PromptTokens = completionResponse.PromptTokens,
CompletionTokens = completionResponse.CompletionTokens
CompletionTokens = completionResponse.CompletionTokens,
AnalysisResults = completionResponse.AnalysisResults
};
}

Expand Down

0 comments on commit 39e6d65

Please sign in to comment.