Skip to content

Commit

Permalink
Fix stream task qos
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrylo-mukha committed Apr 3, 2023
1 parent 6d2c1a4 commit 0820a99
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion OpenAIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'OpenAIKit'
s.version = '1.3.1'
s.version = '1.3.2'
s.summary = 'OpenAI is a community-maintained repository containing Swift implementation over OpenAI public API.'

s.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion Sources/OpenAIKit/OpenAIKitRequests/Chat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public extension OpenAIKit {

let headers = baseHeaders

Task(priority: .background) {
Task(priority: .userInitiated) {
do {
let asyncStream: AsyncThrowingStream<AIStreamResponse<AIResponseModel>, Error> = try await network.requestStream(endpoint.method, url: endpoint.urlPath, body: requestData, headers: headers)

Expand Down
2 changes: 1 addition & 1 deletion Sources/OpenAIKit/OpenAIKitRequests/Completions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public extension OpenAIKit {

let headers = baseHeaders

Task(priority: .background) {
Task(priority: .userInitiated) {
do {
let asyncStream: AsyncThrowingStream<AIStreamResponse<AIResponseModel>, Error> = try await network.requestStream(endpoint.method, url: endpoint.urlPath, body: requestData, headers: headers)

Expand Down

0 comments on commit 0820a99

Please sign in to comment.