Commit a874fb6 1 parent 204448d commit a874fb6 Copy full SHA for a874fb6
File tree 2 files changed +5
-5
lines changed
OpenAI/Intramodular/Models
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ extension Anthropic: LLMRequestHandling {
75
75
prompt: AbstractLLM . ChatPrompt ,
76
76
parameters: AbstractLLM . ChatCompletionParameters
77
77
) async throws -> AbstractLLM . ChatCompletion {
78
- let completion = try await _complete (
78
+ let completion : AbstractLLM . TextCompletion = try await _complete (
79
79
prompt: AbstractLLM . TextPrompt (
80
80
prefix: PromptLiteral ( stringLiteral: prompt. messages. anthropicPromptString)
81
81
) ,
@@ -85,18 +85,18 @@ extension Anthropic: LLMRequestHandling {
85
85
)
86
86
)
87
87
88
- let isAssistantReply = ( prompt. messages. last? . role ?? . user) == . user
88
+ let isAssistantReply : Bool = ( prompt. messages. last? . role ?? . user) == . user
89
89
let content : String = completion. text
90
90
let message = AbstractLLM . ChatMessage (
91
91
id: UUID ( ) ,
92
- role: isAssistantReply ? . assistant : . user,
92
+ role: ( isAssistantReply ? . assistant : . user) ,
93
93
content: content
94
94
)
95
95
96
96
return AbstractLLM . ChatCompletion (
97
97
prompt: prompt. messages,
98
98
message: message,
99
- stopReason: . init ( ) // FIXME: !!!
99
+ stopReason: AbstractLLM . ChatCompletion . StopReason ( ) // FIXME: !!!
100
100
)
101
101
}
102
102
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ extension OpenAI {
28
28
self . firstID = try container. decodeIfPresent ( forKey: . firstID)
29
29
self . lastID = try container. decodeIfPresent ( forKey: . lastID)
30
30
31
- try super. init ( from : decoder )
31
+ try super. init ( type : . list )
32
32
}
33
33
34
34
public override func encode( to encoder: Encoder ) throws {
You can’t perform that action at this time.
0 commit comments