Skip to content

Commit

Permalink
updated stream error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardcqian committed Sep 25, 2023
1 parent 799d235 commit 10b26b2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/plugin/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ func (a *App) runOpenAIChatCompletionsStream(ctx context.Context, req *backend.R
// set stream to true
requestBody["stream"] = true

u, _ := url.Parse(settings.OpenAI.URL)
u, err := url.Parse(settings.OpenAI.URL)

if err != nil {
return fmt.Errorf("Unable to parse OpenAI URL: %w", err)


var outgoingBody []byte

Expand Down

0 comments on commit 10b26b2

Please sign in to comment.