openai.ex
openai.ex copied to clipboard
community-maintained OpenAI API Wrapper written in Elixir.
this PR adds the newly added project authentication. If you are like me and have many projects all using the same account, now this lets you split things up for...
During periods of high volume, and in particular when using some of the gpt-3.5 series models, OpenAI will occasionally split events into multiple chunks. The current approach of splitting each...
The `applications` key in `OpenAI.MixProject.application/0` is most likely a relict from older mix versions. I don't think it does serve a purpose anymore and we get compiler warnings in our...
Fixes #60 This patch reworks the OpenAI.Stream module to first accumulate the chunks, then parse them into events in order to avoid orphaned events, thereby leading to a Jason.DecodeError Includes...
[Retrieving the contents of a file](https://platform.openai.com/docs/api-reference/files/retrieve-contents) is an API call that wasn't implemented. This PR adds it, although it's not ideal since we're not streaming the file and everything is...
I needed to modify the code to be able to use OpenRouter ( and access GPT 4 32k ). We can now use custom_headers in the config to add custom...
### Describe the feature or improvement you're requesting Currently when `stream: true` is set, we're receiving responses with string keys: ```elixir %{ "choices" => [ %{"delta" => %{"role" => "assistant"},...
### Describe the feature or improvement you're requesting A lot of what's required for defining an agent is also part of the documentation process for methods. maybe there is a...
in some sence api_url is not "https://api.openai.com", so I commit the pr.