mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
fix: repair embedding rerank CI checks
This commit is contained in:
@@ -4337,12 +4337,7 @@ fn rerank_request_from_raw(body_json: &Value, namespace: &str) -> Option<Canonic
|
||||
.map(str::trim)
|
||||
.filter(|value| !value.is_empty())?
|
||||
.to_string();
|
||||
let documents = request
|
||||
.get("documents")
|
||||
.and_then(Value::as_array)?
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect::<Vec<_>>();
|
||||
let documents = request.get("documents").and_then(Value::as_array)?.to_vec();
|
||||
let rerank = CanonicalRerankRequest {
|
||||
query,
|
||||
documents,
|
||||
|
||||
@@ -676,12 +676,13 @@ mod tests {
|
||||
Some("ai_public"),
|
||||
Some("openai"),
|
||||
Some("embedding"),
|
||||
None,
|
||||
&Method::POST,
|
||||
"/v1/embeddings",
|
||||
),
|
||||
Some(OPENAI_EMBEDDING_SYNC_PLAN_KIND)
|
||||
);
|
||||
assert!(supports_sync_scheduler_decision_kind(
|
||||
assert!(supports_sync_execution_decision_kind(
|
||||
OPENAI_EMBEDDING_SYNC_PLAN_KIND
|
||||
));
|
||||
}
|
||||
@@ -693,12 +694,13 @@ mod tests {
|
||||
Some("ai_public"),
|
||||
Some("openai"),
|
||||
Some("rerank"),
|
||||
None,
|
||||
&Method::POST,
|
||||
"/v1/rerank",
|
||||
),
|
||||
Some(OPENAI_RERANK_SYNC_PLAN_KIND)
|
||||
);
|
||||
assert!(supports_sync_scheduler_decision_kind(
|
||||
assert!(supports_sync_execution_decision_kind(
|
||||
OPENAI_RERANK_SYNC_PLAN_KIND
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user