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

[Provider] Recraft AI #835

Merged
merged 5 commits into from
Dec 24, 2024
Merged

[Provider] Recraft AI #835

merged 5 commits into from
Dec 24, 2024

Conversation

Ajay-Satish-01
Copy link
Contributor

Title:

  • Add Recraft AI to Provider

Description: (optional)

  • Add with image generation

Related Issues: (optional)

@Ajay-Satish-01
Copy link
Contributor Author

@VisargD according to the documentation:

Note: style_id and style parameters are mutually exclusive. If neither of the two parameters is specified, the default style of realistic_image will be used

I have included a commented block of code. Should I include that or will the included be fine?

@Ajay-Satish-01 Ajay-Satish-01 marked this pull request as draft December 20, 2024 09:11
@VisargD
Copy link
Collaborator

VisargD commented Dec 20, 2024

@VisargD according to the documentation:

Note: style_id and style parameters are mutually exclusive. If neither of the two parameters is specified, the default style of realistic_image will be used

I have included a commented block of code. Should I include that or will the included be fine?

We should let the provider itself take care of defaults and validation error. The commented code is not required. Gateway currently does not throw validation error for provider specific errors because maintaining parity would become a hassle.

@Ajay-Satish-01
Copy link
Contributor Author

@VisargD according to the documentation:
Note: style_id and style parameters are mutually exclusive. If neither of the two parameters is specified, the default style of realistic_image will be used
I have included a commented block of code. Should I include that or will the included be fine?

We should let the provider itself take care of defaults and validation error. The commented code is not required. Gateway currently does not throw validation error for provider specific errors because maintaining parity would become a hassle.

Removed commented code.

@VisargD
Copy link
Collaborator

VisargD commented Dec 20, 2024

Please move the PR to ready state for review once its done.

@Ajay-Satish-01 Ajay-Satish-01 marked this pull request as ready for review December 20, 2024 19:31
@VisargD
Copy link
Collaborator

VisargD commented Dec 24, 2024

Hey @Ajay-Satish-01 , following parameters are not added in the mapping:

  • model - This is an OpenAI compatible param and can be mapped as it is.
  • artistic_level and substyle - These are Recraft specific params which are not OpenAI compatible. But they can be added as it is in case user wants to use them.

So we can add these 3 mapping in the RecraftAIImageGenerateConfig:

model: {
  param: 'model',
},
artistic_level: {
  param: 'artistic_level',
},
substyle: {
  param: 'substyle',
},

Everything else LGTM!

@Ajay-Satish-01
Copy link
Contributor Author

@VisargD I have added those parameters as well. Anything else that I should fix or add?

@VisargD VisargD merged commit 7dcd668 into Portkey-AI:main Dec 24, 2024
2 checks passed
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