We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b80c9d commit 8110127Copy full SHA for 8110127
Tool/Sources/OpenAIService/HeaderValueParser.swift
@@ -15,7 +15,7 @@ public struct HeaderValueParser {
15
public var apiKey: String
16
public var gitHubCopilotToken: () async -> GitHubCopilotExtension.Token?
17
public var shellEnvironmentVariable: (_ key: String) async -> String?
18
-
+
19
public init(
20
modelName: String,
21
apiKey: String,
@@ -66,7 +66,10 @@ public struct HeaderValueParser {
66
}
67
68
if let replacement {
69
- parsedValue.replaceSubrange(range, with: replacement)
+ parsedValue.replaceSubrange(
70
+ range,
71
+ with: replacement.trimmingCharacters(in: .whitespacesAndNewlines)
72
+ )
73
} else {
74
parsedValue.replaceSubrange(range, with: "none")
75
0 commit comments