Skip to content

Commit

Permalink
No streaming for o1 (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoedecke authored Dec 20, 2024
2 parents c323588 + 943d3c6 commit 9344f2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/azuremodels/azure_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func NewAzureClient(httpClient *http.Client, authToken string, cfg *AzureClientC

// GetChatCompletionStream returns a stream of chat completions using the given options.
func (c *AzureClient) GetChatCompletionStream(ctx context.Context, req ChatCompletionOptions) (*ChatCompletionResponse, error) {
// Check if the model name is `o1-mini` or `o1-preview`
if req.Model == "o1-mini" || req.Model == "o1-preview" {
// Check for o1 models, which don't support streaming
if req.Model == "o1-mini" || req.Model == "o1-preview" || req.Model == "o1" {
req.Stream = false
} else {
req.Stream = true
Expand Down

0 comments on commit 9344f2b

Please sign in to comment.