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

Added apiCallTimeout param for Bedrock and it fixes langchain4j/langc… #1726

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

niksbansode
Copy link
Contributor

@niksbansode niksbansode commented Sep 7, 2024

Issue

Fixes #1704

Change

Added timeout support in BedrockCharModel. The default timeout is set to 1 minute.

General checklist

  • There are no breaking changes
  • I have added unit and integration tests for my change
  • I have manually run all the unit and integration tests in the module I have added/changed, and they are all green
  • [?] I have manually run all the unit and integration tests in the core and main modules, and they are all green
    I only ran core module, and I didn't run main as I don't have openAiApiKey

Checklist for adding new model integration

  • I have added my new module in the BOM

Checklist for adding new embedding store integration

  • I have added a {NameOfIntegration}EmbeddingStoreIT that extends from either EmbeddingStoreIT or EmbeddingStoreWithFilteringIT
  • I have added my new module in the BOM

Checklist for changing existing embedding store integration

  • I have manually verified that the {NameOfIntegration}EmbeddingStore works correctly with the data persisted using the latest released version of LangChain4j

@langchain4j langchain4j added the P2 High priority label Sep 9, 2024
Copy link
Owner

@langchain4j langchain4j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niksbansode thank you!

@@ -47,6 49,8 @@ public abstract class AbstractSharedBedrockChatModel {
@Builder.Default
protected final int topK = 250;
@Builder.Default
protected final Duration timeout = Duration.ofMinutes(5L);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 minutes seems too high... What about 1 minute?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Owner

@langchain4j langchain4j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niksbansode thank you!

@langchain4j langchain4j merged commit 0eb6de2 into langchain4j:main Sep 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 High priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add timeout support for Amazon Bedrock Anthropic API
2 participants