diff --git a/Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift b/Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift index 96e1a97a..2eab6489 100644 --- a/Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift +++ b/Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift @@ -134,14 +134,14 @@ actor OpenAIChatCompletionsService: ChatCompletionsStreamAPI, ChatCompletionsAPI struct Choice: Codable, Equatable { var message: Message - var index: Int - var finish_reason: String + var index: Int? + var finish_reason: String? } struct Usage: Codable, Equatable { - var prompt_tokens: Int - var completion_tokens: Int - var total_tokens: Int + var prompt_tokens: Int? + var completion_tokens: Int? + var total_tokens: Int? } var id: String? @@ -287,7 +287,7 @@ actor OpenAIChatCompletionsService: ChatCompletionsStreamAPI, ChatCompletionsAPI return .init(chunk: chunk, done: false) } catch { Logger.service.error("Error decoding stream data: \(error)") - throw error + return .init(chunk: nil, done: false) } } diff --git a/Version.xcconfig b/Version.xcconfig index deb81403..c8e46a98 100644 --- a/Version.xcconfig +++ b/Version.xcconfig @@ -1,3 +1,3 @@ -APP_VERSION = 0.31.0 -APP_BUILD = 333 +APP_VERSION = 0.31.1 +APP_BUILD = 334 diff --git a/appcast.xml b/appcast.xml index 5cb4561e..234647e1 100644 --- a/appcast.xml +++ b/appcast.xml @@ -2,6 +2,18 @@ Copilot for Xcode + + 0.31.1 + Wed, 13 Mar 2024 21:24:28 +0800 + 334 + 0.31.1 + 12.0 + + https://github.com/intitni/CopilotForXcode/releases/tag/0.31.1 + + + + 0.31.0 Fri, 08 Mar 2024 14:48:32 +0800