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

Week 11 #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Week 11 #1

wants to merge 2 commits into from

Conversation

monadierickx
Copy link

No description provided.

Copy link
Collaborator

@sebsto sebsto left a comment

Choose a reason for hiding this comment

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

Good initial push !
Let's discuss together how to iterate from there

case BedrockModel.deepseek_r1_v1.id:
self = BedrockModel.deepseek_r1_v1
default:
return nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

nil ? the user will not be able to use it's own model then. It should return a generic instance, with rawvalue that the user can use even if we did not add support for it

public init() {}

public func invokeModel(input: InvokeModelInput) async throws -> InvokeModelOutput {
guard let modelId = input.modelId else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sur ethese are required in a mock - unless you have tests to check these

Copy link
Author

Choose a reason for hiding this comment

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

I added these because the modelId and body are optionals in InvokeModelInput in the BedrockRuntime SDK, so to make sure SwiftBedrock actually created a valid InvokeModelInput I added these checks. The real client would throw an error as well if no modelId or prompt was given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants