echolabsdev / prism

A unified interface for working with LLMs in Laravel
https://prism.echolabs.dev
MIT License
405 stars 20 forks source link

Adds OpenAI Organization to Header #10

Open peterramsing opened 2 days ago

peterramsing commented 2 days ago

Adds the ability to pass in an OpenAI Organization to the header

Fixes: #9

peterramsing commented 2 days ago

Tonight I'll figure out the right way to test this and remove the draft.

sixlive commented 1 day ago

@peterramsing I just pushed c25c4fa and 05bb47c as refactors, take a look and let me know what you think!

peterramsing commented 1 day ago

@sixlive, the tests are so much cleaner. Thanks for knowing how to wield that HTTP better than I!

-- I think the conditional logic for adding it got a bit muddled with both lint added the '' and '0' check, along with always passing the header, though. I have to jump to work, but will check my assumptions on that "always passing the header" tonight or during lunch if I have some extra time.

peterramsing commented 12 hours ago

@sixlive , this is ready for a final review, unless if we wanted to deal with making the API key optional in the same way that the organization is optional. Not sure if we want to add more to this PR, though.