Updated database calls to share single connection, and simplified top_k_search sorting.
Co-authored-by: maxbrunsfeld <max@zed.dev>
This commit is contained in:
parent
0f232e0ce2
commit
74b693d6b9
4 changed files with 148 additions and 124 deletions
|
@ -94,16 +94,6 @@ impl EmbeddingProvider for OpenAIEmbeddings {
|
|||
response.usage.total_tokens
|
||||
);
|
||||
|
||||
// do we need to re-order these based on the `index` field?
|
||||
eprintln!(
|
||||
"indices: {:?}",
|
||||
response
|
||||
.data
|
||||
.iter()
|
||||
.map(|embedding| embedding.index)
|
||||
.collect::<Vec<_>>()
|
||||
);
|
||||
|
||||
Ok(response
|
||||
.data
|
||||
.into_iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue