Skip to content

Commit 91b772b

Browse files
committed
Improved naming [skip ci]
1 parent a3c71f1 commit 91b772b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/sparse/example.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ function fetchEmbeddings($inputs)
3333
$context = stream_context_create($opts);
3434
$response = file_get_contents($url, false, $context);
3535
$embeddings = [];
36-
foreach (json_decode($response, true) as $row) {
36+
foreach (json_decode($response, true) as $item) {
3737
$embedding = [];
38-
foreach ($row as $v) {
39-
$embedding[$v['index']] = $v['value'];
38+
foreach ($item as $e) {
39+
$embedding[$e['index']] = $e['value'];
4040
}
4141
$embeddings[] = $embedding;
4242
}

0 commit comments

Comments
 (0)