mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 11:26:52 +08:00
chore: apply ruff's pyupgrade linter rules to modernize Python code with targeted version (#2419)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import logging
|
||||
import threading
|
||||
import time
|
||||
from typing import List
|
||||
|
||||
import numpy as np
|
||||
from flask import current_app
|
||||
@@ -131,7 +130,7 @@ class HitTestingService:
|
||||
return cls.compact_retrieve_response(dataset, embeddings, query, all_documents)
|
||||
|
||||
@classmethod
|
||||
def compact_retrieve_response(cls, dataset: Dataset, embeddings: Embeddings, query: str, documents: List[Document]):
|
||||
def compact_retrieve_response(cls, dataset: Dataset, embeddings: Embeddings, query: str, documents: list[Document]):
|
||||
text_embeddings = [
|
||||
embeddings.embed_query(query)
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user