Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration for PollingHttpClient polling interval #2060

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
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
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
Loading