Skip to content

Commit

Permalink
chore: bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
restlessronin committed Dec 24, 2024
1 parent bb0d306 commit dd2317b
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ body:
id: lib-version
attributes:
label: Library version
placeholder: openai_ex 0.8.5
placeholder: openai_ex 0.8.6
validations:
required: true
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule OpenaiEx.MixProject do
use Mix.Project

@version "0.8.5"
@version "0.8.6"
@description "Community maintained Elixir library for OpenAI API"
@source_url "https://github.com/restlessronin/openai_ex"

Expand Down
6 changes: 2 additions & 4 deletions notebooks/cleanup.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

```elixir
Mix.install([
{:openai_ex, "~> 0.8.5"},
{:kino, "~> 0.13.2"}
{:openai_ex, "~> 0.8.6"},
{:kino, "~> 0.14.2"}
])
```

Expand Down Expand Up @@ -50,5 +50,3 @@ OpenaiEx.Beta.Assistants.list!(openai)
```elixir
openai |> OpenaiEx.Beta.VectorStores.list!()
```

<!-- livebook:{"offset":945,"stamp":{"token":"XCP.UtkySz4q0ZIjbnxKHDFEd4RRZfKookRU6K5xUhFPwPoBvBaeShIDfRpYIrWtZhw8qTwjpZ9L4Ic64MM5uwVQxm5AvLrs0LmWat_UkjEnWUudx7Zcy3HoLPE","version":2}} -->
2 changes: 1 addition & 1 deletion notebooks/completions.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```elixir
Mix.install([
{:openai_ex, "~> 0.8.5"},
{:openai_ex, "~> 0.8.6"},
{:kino, "~> 0.13.1"}
])

Expand Down
4 changes: 2 additions & 2 deletions notebooks/dlai_orderbot.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

```elixir
Mix.install([
{:openai_ex, "~> 0.8.5"},
{:kino, "~> 0.13.2"}
{:openai_ex, "~> 0.8.6"},
{:kino, "~> 0.14.2"}
])

alias OpenaiEx
Expand Down
4 changes: 2 additions & 2 deletions notebooks/images.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

```elixir
Mix.install([
{:openai_ex, "~> 0.8.5"},
{:kino, "~> 0.13.2"}
{:openai_ex, "~> 0.8.6"},
{:kino, "~> 0.14.2"}
])

alias OpenaiEx
Expand Down
4 changes: 2 additions & 2 deletions notebooks/streaming_orderbot.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

```elixir
Mix.install([
{:openai_ex, "~> 0.8.5"},
{:kino, "~> 0.13.2"}
{:openai_ex, "~> 0.8.6"},
{:kino, "~> 0.14.2"}
])

alias OpenaiEx
Expand Down
18 changes: 11 additions & 7 deletions notebooks/userguide.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

```elixir
Mix.install([
{:openai_ex, "~> 0.8.5"},
{:openai_ex, "~> 0.8.6"},
# {:openai_ex, path: Path.join(__DIR__, "..")},
{:kino, "~> 0.13.2"}
{:kino, "~> 0.14.2"}
])
```

Expand Down Expand Up @@ -43,7 +43,7 @@ Add the following code to the first connection cell:
```elixir
Mix.install(
[
{:openai_ex, "~> 0.8.5"}
{:openai_ex, "~> 0.8.6"}
]
)
```
Expand All @@ -57,7 +57,7 @@ Add the following to your mix.exs file:
```elixir
def deps do
[
{:openai_ex, "~> 0.8.5"}
{:openai_ex, "~> 0.8.6"}
]
end
```
Expand Down Expand Up @@ -136,20 +136,24 @@ Generally they work on the basis of additional HTTP headers being added that spe
For example, to configure your client for openai using the portkey gateway, you would do this:

```elixir
OpenaiEx.new(open_ai_api_key)
openai_api_key = "an-openai-api-key"
portkey_api_key = "a-portkey-api-key"

OpenaiEx.new(openai_api_key)
|> OpenaiEx.with_base_url("https://api.portkey.ai/v1")
|> OpenaiEx.with_additional_headers(%{"x-portkey-api-key"=>portkey_api_key, "x-portkey-provider"=>"openai"})
```

similarly, for Anthropic, you would do this:

```elixir
anthropic_api_key = "some-anthropic-api-key"

OpenaiEx.new(anthropic_api_key)
|> OpenaiEx.with_base_url("https://api.portkey.ai/v1")
|> OpenaiEx.with_additional_headers(%{"x-portkey-api-key"=>portkey_api_key, "x-portkey-provider"=>"anthropic"})
```


### Azure OpenAI

The Azure OpenAI API replicates the Completion, Chat Completion and Embeddings endpoints from OpenAI.
Expand Down Expand Up @@ -760,7 +764,7 @@ Next we call `FineTuning.Jobs.new()` to create a new request structure
```elixir
alias OpenaiEx.FineTuning

ft_req = FineTuning.Jobs.new(model: "davinci-002", training_file: upload_res["id"])
ft_req = FineTuning.Jobs.new(model: "gpt-4o-mini-2024-07-18", training_file: upload_res["id"])
```

To begin the fine tune, we call the [`FineTuning.Jobs.create()`](https://platform.openai.com/docs/api-reference/fine-tunes/create) function
Expand Down

0 comments on commit dd2317b

Please sign in to comment.