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

feat: OpenAI Custom Headers/Params and Debug Page #4227

Merged

Conversation

michael-genson
Copy link
Collaborator

What type of PR is this?

(REQUIRED)

  • documentation
  • feature

What this PR does / why we need it:

(REQUIRED)

This PR adds a few customization options to the OpenAI config to allow for more custom integrations (e.g. with Azure OpenAI). It also adds an admin OpenAI debug page (I also moved the parser debug page there):

image

image

Optionally you can provide an image:
image

And here's an error (I added the word "test" to the end of my API key):
image

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #4119

Special notes for your reviewer:

(fill-in or delete this section)

Testing

(fill-in or delete this section)

Manually

Copy link
Collaborator

@Kuchenpirat Kuchenpirat left a comment

Choose a reason for hiding this comment

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

Looks all good to me.
OpenAI debugging does work as expected. I have no way of real-world testing custom headers and params but the implementation makes sense to me and i hope we have some people testing that out in nightly for us.

@Kuchenpirat Kuchenpirat merged commit ea1f727 into mealie-recipes:mealie-next Sep 23, 2024
13 checks passed
@AntoineBriseboisRoy
Copy link

I tried testing custom params this morning. I can't figure out the required format to put in my docker-compose since it is not specified in the doc. I think it would be important to include an exemple in the doc.

Can you give me a hint here? ;)

@Kuchenpirat
Copy link
Collaborator

I tried testing custom params this morning. I can't figure out the required format to put in my docker-compose since it is not specified in the doc. I think it would be important to include an exemple in the doc.

Can you give me a hint here? ;)

There is an example in the docs in the backend config page on the openai section.
https://docs.mealie.io/documentation/getting-started/installation/backend-config/#openai

OPENAI_CUSTOM_PARAMS='{"k1": "v1", "k2": "v2"}'

@michael-genson michael-genson deleted the feat/openai-custom-params branch September 23, 2024 14:51
boc-the-git pushed a commit to boc-the-git/mealie that referenced this pull request Sep 28, 2024
boc-the-git pushed a commit to boc-the-git/mealie that referenced this pull request Sep 28, 2024
Choromanski pushed a commit to Choromanski/mealie that referenced this pull request Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mealie Azure OpenAI bad connection url
3 participants