Skip to content

Commit

Permalink
Add OpenAiClient stream handling, update types (foundation-model-stac…
Browse files Browse the repository at this point in the history
…k#230)

* Add initial stream handling for OpenAiClient

Signed-off-by: declark1 <[email protected]>

* Update OpenAiClient types and fix streaming request

Signed-off-by: declark1 <[email protected]>

* Add OpenAiError and parse error message, order dependencies

Signed-off-by: declark1 <[email protected]>

* Drop openai client tests module

Signed-off-by: declark1 <[email protected]>

* Telemetry rebase and updates

Signed-off-by: declark1 <[email protected]>

* Return SSE events directly from OpenAiClient stream

Signed-off-by: declark1 <[email protected]>

* Add headers to OpenAiClient chat_completions method

Signed-off-by: declark1 <[email protected]>

---------

Signed-off-by: declark1 <[email protected]>
  • Loading branch information
declark1 authored Oct 30, 2024
1 parent 9a5217f commit 521c80f
Show file tree
Hide file tree
Showing 4 changed files with 213 additions and 31 deletions.
49 changes: 49 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ opentelemetry-otlp = { version = "0.17.0", features = ["http-proto"] }
opentelemetry_sdk = { version = "0.24.1", features = ["rt-tokio", "metrics"] }
prost = "0.13.1"
reqwest = { version = "0.12.5", features = ["blocking", "rustls-tls", "json"] }
reqwest-eventsource = "0.6.0"
rustls = {version = "0.23.12", default-features = false, features = ["std"]}
rustls-pemfile = "2.1.3"
rustls-webpki = "0.102.6"
Expand Down
Loading

0 comments on commit 521c80f

Please sign in to comment.