Skip to content

Commit

Permalink
Merge pull request #2060 from solliancenet/cj-configurable-polling
Browse files Browse the repository at this point in the history
Add configuration for PollingHttpClient polling interval
  • Loading branch information
codingbandit authored Dec 12, 2024
2 parents f284118 + a2cc014 commit 4bb9787
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/release-notes/breaking-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The following new App Configuration settings are required:
|`FoundationaLLM:APIEndpoints:LangChainAPI:Configuration:ExternalModules:Storage:AuthenticationType` | `-` | `-` |
|`FoundationaLLM:APIEndpoints:LangChainAPI:Configuration:ExternalModules:RootStorageContainer` | `-` | `-` |
|`FoundationaLLM:APIEndpoints:LangChainAPI:Configuration:ExternalModules:Modules` | `-` | `-` |
|`FoundationaLLM:APIEndpoints:LangChainAPI:Configuration:PollingIntervalSeconds` | `10` | The interval in seconds at which the LangChain API will be polled for status. |
|`FoundationaLLM:UserPortal:Configuration:ShowMessageRating` | `true` | If `true`, rating options on agent messages will appear. |
|`FoundationaLLM:UserPortal:Configuration:ShowLastConversationOnStartup` | `false` | If `true`, the last conversation will be displayed when the user logs in. Otherwise, a new conversation placeholder appears on page load. |
|`FoundationaLLM:UserPortal:Configuration:ShowMessageTokens` | `true` | If `true`, the number of consumed tokens on agent and user messages will appear. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
/// </summary>
public class LangChainServiceSettings
{

/// <summary>
/// The polling interval in seconds to check the status of the LangChain service.
/// </summary>
public int PollingIntervalSeconds { get; set; } = 10;

}
}
2 changes: 1 addition & 1 deletion src/dotnet/Orchestration/Services/LangChainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private async Task<PollingHttpClient<LLMCompletionRequest, LLMCompletionResponse
client,
request,
$"instances/{instanceId}/async-completions",
TimeSpan.FromSeconds(10),
TimeSpan.FromSeconds(_settings.PollingIntervalSeconds),
client.Timeout.Subtract(TimeSpan.FromSeconds(1)),
_logger);
}
Expand Down

0 comments on commit 4bb9787

Please sign in to comment.