Skip to content

Commit

Permalink
Merge pull request #1750 from solliancenet/cj-external-orchestration-…
Browse files Browse the repository at this point in the history
…polling

Update polling endpoint for external orchestration services
  • Loading branch information
alistar-andrei committed Sep 19, 2024
2 parents 96a96c3 + 39e6d65 commit 81af937
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 81af937

Please sign in to comment.