74
74
* @author Christian Tzolov
75
75
* @author luocongqiu
76
76
* @author Thomas Vitale
77
+ * @author Jihoon Kim
77
78
* @since 1.0.0
78
79
*/
79
80
public class OllamaChatModel extends AbstractToolCallSupport implements ChatModel {
@@ -97,7 +98,7 @@ public OllamaChatModel(OllamaApi ollamaApi, OllamaOptions defaultOptions,
97
98
Assert .notNull (ollamaApi , "ollamaApi must not be null" );
98
99
Assert .notNull (defaultOptions , "defaultOptions must not be null" );
99
100
Assert .notNull (observationRegistry , "observationRegistry must not be null" );
100
- Assert .notNull (observationRegistry , "modelManagementOptions must not be null" );
101
+ Assert .notNull (modelManagementOptions , "modelManagementOptions must not be null" );
101
102
this .chatApi = ollamaApi ;
102
103
this .defaultOptions = defaultOptions ;
103
104
this .observationRegistry = observationRegistry ;
@@ -118,8 +119,8 @@ public static ChatResponseMetadata from(OllamaApi.ChatResponse response) {
118
119
.withKeyValue ("eval-duration" , response .evalDuration ())
119
120
.withKeyValue ("eval-count" , response .evalCount ())
120
121
.withKeyValue ("load-duration" , response .loadDuration ())
121
- .withKeyValue ("eval-duration" , response .promptEvalDuration ())
122
- .withKeyValue ("eval-count" , response .promptEvalCount ())
122
+ .withKeyValue ("prompt- eval-duration" , response .promptEvalDuration ())
123
+ .withKeyValue ("prompt- eval-count" , response .promptEvalCount ())
123
124
.withKeyValue ("total-duration" , response .totalDuration ())
124
125
.withKeyValue ("done" , response .done ())
125
126
.build ();
0 commit comments