Skip to content

Commit a874fb6

Browse files
committed
Update package
1 parent 204448d commit a874fb6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Sources/Anthropic/Intramodular/Anthropic+LLMRequestHandling.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ extension Anthropic: LLMRequestHandling {
7575
prompt: AbstractLLM.ChatPrompt,
7676
parameters: AbstractLLM.ChatCompletionParameters
7777
) async throws -> AbstractLLM.ChatCompletion {
78-
let completion = try await _complete(
78+
let completion: AbstractLLM.TextCompletion = try await _complete(
7979
prompt: AbstractLLM.TextPrompt(
8080
prefix: PromptLiteral(stringLiteral: prompt.messages.anthropicPromptString)
8181
),
@@ -85,18 +85,18 @@ extension Anthropic: LLMRequestHandling {
8585
)
8686
)
8787

88-
let isAssistantReply = (prompt.messages.last?.role ?? .user) == .user
88+
let isAssistantReply: Bool = (prompt.messages.last?.role ?? .user) == .user
8989
let content: String = completion.text
9090
let message = AbstractLLM.ChatMessage(
9191
id: UUID(),
92-
role: isAssistantReply ? .assistant : .user,
92+
role: (isAssistantReply ? .assistant : .user),
9393
content: content
9494
)
9595

9696
return AbstractLLM.ChatCompletion(
9797
prompt: prompt.messages,
9898
message: message,
99-
stopReason: .init() // FIXME: !!!
99+
stopReason: AbstractLLM.ChatCompletion.StopReason() // FIXME: !!!
100100
)
101101
}
102102

Sources/OpenAI/Intramodular/Models/OpenAI.List.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extension OpenAI {
2828
self.firstID = try container.decodeIfPresent(forKey: .firstID)
2929
self.lastID = try container.decodeIfPresent(forKey: .lastID)
3030

31-
try super.init(from: decoder)
31+
try super.init(type: .list)
3232
}
3333

3434
public override func encode(to encoder: Encoder) throws {

0 commit comments

Comments
 (0)