We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22ed668 commit a70a449Copy full SHA for a70a449
1 file changed
src/Agents/Adapters/Ollama.php
@@ -73,9 +73,9 @@ public function embed(string $text): array
73
/**
74
* @var array{
75
* error?: string,
76
- * embeddings?: array<int, array<int, float>>,
77
- * total_duration?: int,
78
- * load_duration?: int
+ * embeddings: array<int, array<int, float>>,
+ * total_duration: int,
+ * load_duration: int
79
* }|null $json
80
*/
81
$json = is_string($body) ? json_decode($body, true) : null;
@@ -86,8 +86,8 @@ public function embed(string $text): array
86
87
return [
88
'embedding' => $json['embeddings'][0],
89
- 'total_duration' => $json['total_duration'] ?? null,
90
- 'load_duration' => $json['load_duration'] ?? null,
+ 'total_duration' => $json['total_duration'],
+ 'load_duration' => $json['load_duration'],
91
];
92
}
93
0 commit comments