-
Notifications
You must be signed in to change notification settings - Fork 102
Use Inference Profiles on AWS Bedrock Models #506
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
Conversation
Heavy tests aren't fixed yet, but I'm on my way to do it. |
...edrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/BedrockLLMClient.kt
Outdated
Show resolved
Hide resolved
1b2bbf2
to
fe0f6e4
Compare
Qodana for JVM385 new problems were found
@@ Code coverage @@
+ 68% total lines covered
8823 lines analyzed, 6019 lines covered
# Calculated according to the filters of your coverage tool ☁️ View the detailed Qodana report Contact Qodana teamContact us at [email protected]
|
fe0f6e4
to
b86fa5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should look into how models are provided in AWS
As far as I understand, the structure is:
Region → Model Family → Model Name
We could wrap this in enums or classes to avoid using raw strings. It would also simplify our code by removing string-based matching
...edrock-client/src/jvmMain/kotlin/ai/koog/prompt/executor/clients/bedrock/BedrockLLMClient.kt
Outdated
Show resolved
Hide resolved
2d1ada9
to
fb92132
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I have very little knowledge of the wider scope that this code might affect, but from a usage standpoint, it looks like it should do the trick :)
fb92132
to
fb0c10a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, PR looks good, but please take a look at my questions and comments
I think in this case it would be better to create an issue and a separate PR for fixing the Bedrock client
@@ -1,7 +1,7 @@ | |||
package ai.koog.agents.memory.storage | |||
|
|||
import java.security.SecureRandom | |||
import java.util.* | |||
import java.util.Base64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good practice would be to use the Kotlin api where possible. Although in this case it doesn’t change anything, since kotlin simply wraps Java Base64
. This approach will reduce potential issues if the code ever needs to be moved to common
...sts/src/jvmTest/kotlin/ai/koog/integration/tests/MultipleLLMPromptExecutorIntegrationTest.kt
Show resolved
Hide resolved
integration-tests/src/jvmTest/kotlin/ai/koog/integration/tests/utils/RetryUtils.kt
Show resolved
Hide resolved
* | ||
* Represents all available AWS regions where Bedrock service is supported. | ||
*/ | ||
@Serializable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pay attention to the behavior of the Serializable enum
https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/json.md#decoding-enums-in-a-case-insensitive-manner
…efixes with region support
32f9cfa
to
51ec4dc
Compare
Fixes #488
Type of the change
Checklist for all pull requests
develop
as the base branchAdditional steps for pull requests adding a new feature