chore: docstring not match the function parameter (#17162)

This commit is contained in:
非法操作
2025-03-31 13:19:15 +08:00
committed by GitHub
parent 32527b26d5
commit 44f911a0a8
47 changed files with 60 additions and 95 deletions

View File

@@ -177,7 +177,6 @@ class OpenGauss(BaseVector):
Search the nearest neighbors to a vector.
:param query_vector: The input vector to search for similar items.
:param top_k: The number of nearest neighbors to return, default is 5.
:return: List of Documents that are nearest to the query vector.
"""
top_k = kwargs.get("top_k", 4)

View File

@@ -197,7 +197,6 @@ class OracleVector(BaseVector):
Search the nearest neighbors to a vector.
:param query_vector: The input vector to search for similar items.
:param top_k: The number of nearest neighbors to return, default is 5.
:return: List of Documents that are nearest to the query vector.
"""
top_k = kwargs.get("top_k", 4)

View File

@@ -167,7 +167,6 @@ class PGVector(BaseVector):
Search the nearest neighbors to a vector.
:param query_vector: The input vector to search for similar items.
:param top_k: The number of nearest neighbors to return, default is 5.
:return: List of Documents that are nearest to the query vector.
"""
top_k = kwargs.get("top_k", 4)

View File

@@ -22,7 +22,6 @@ class TidbService:
:param iam_url: The URL of the TiDB Cloud IAM API (required).
:param public_key: The public key for the API (required).
:param private_key: The private key for the API (required).
:param display_name: The user-friendly display name of the cluster (required).
:param region: The region where the cluster will be created (required).
:return: The response from the API.
@@ -149,13 +148,12 @@ class TidbService:
):
"""
Update the status of a new TiDB Serverless cluster.
:param tidb_serverless_list: The TiDB serverless list (required).
:param project_id: The project ID of the TiDB Cloud project (required).
:param api_url: The URL of the TiDB Cloud API (required).
:param iam_url: The URL of the TiDB Cloud IAM API (required).
:param public_key: The public key for the API (required).
:param private_key: The private key for the API (required).
:param display_name: The user-friendly display name of the cluster (required).
:param region: The region where the cluster will be created (required).
:return: The response from the API.
"""
@@ -186,12 +184,12 @@ class TidbService:
) -> list[dict]:
"""
Creates a new TiDB Serverless cluster.
:param batch_size: The batch size (required).
:param project_id: The project ID of the TiDB Cloud project (required).
:param api_url: The URL of the TiDB Cloud API (required).
:param iam_url: The URL of the TiDB Cloud IAM API (required).
:param public_key: The public key for the API (required).
:param private_key: The private key for the API (required).
:param display_name: The user-friendly display name of the cluster (required).
:param region: The region where the cluster will be created (required).
:return: The response from the API.

View File

@@ -226,7 +226,6 @@ class WeaviateVector(BaseVector):
Args:
query: Text to look up documents similar to.
k: Number of Documents to return. Defaults to 4.
Returns:
List of Documents most similar to the query.

View File

@@ -7,11 +7,10 @@ class FirecrawlWebExtractor(BaseExtractor):
"""
Crawl and scrape websites and return content in clean llm-ready markdown.
Args:
url: The URL to scrape.
api_key: The API key for Firecrawl.
base_url: The base URL for the Firecrawl API. Defaults to 'https://api.firecrawl.dev'.
job_id: The crawl job id.
tenant_id: The tenant id.
mode: The mode of operation. Defaults to 'scrape'. Options are 'crawl', 'scrape' and 'crawl_return_urls'.
only_main_content: Only return the main content of the page excluding headers, navs, footers, etc.
"""

View File

@@ -14,15 +14,6 @@ class UnstructuredMarkdownExtractor(BaseExtractor):
Args:
file_path: Path to the file to load.
remove_hyperlinks: Whether to remove hyperlinks from the text.
remove_images: Whether to remove images from the text.
encoding: File encoding to use. If `None`, the file will be loaded
with the default system encoding.
autodetect_encoding: Whether to try to autodetect the file encoding
if the specified encoding fails.
"""
def __init__(self, file_path: str, api_url: Optional[str] = None, api_key: str = ""):

View File

@@ -100,6 +100,7 @@ class DatasetRetrieval:
:param hit_callback: hit callback
:param message_id: message id
:param memory: memory
:param inputs: inputs
:return:
"""
dataset_ids = config.dataset_ids
@@ -734,6 +735,7 @@ class DatasetRetrieval:
Calculate keywords scores
:param query: search query
:param documents: documents for reranking
:param top_k: top k
:return:
"""
@@ -1031,8 +1033,6 @@ class DatasetRetrieval:
) -> tuple[ModelInstance, ModelConfigWithCredentialsEntity]:
"""
Fetch model config
:param node_data: node data
:return:
"""
if model is None:
raise ValueError("single_retrieval_config is required")

View File

@@ -235,6 +235,7 @@ class ReactMultiDatasetRouter:
tools: List of tools the agent will have access to, used to format the
prompt.
prefix: String to put before the list of tools.
format_instructions: The format instruction prompt.
Returns:
A PromptTemplate with the template assembled from the pieces here.
"""