You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: gpdb-20160503/alibabacloud_gpdb20160503/models/_cancel_create_index_job_request.py
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,18 +16,46 @@ def __init__(
16
16
region_id: str=None,
17
17
workspace_id: str=None,
18
18
):
19
+
# The name of the collection.
20
+
#
21
+
# > You can call the [ListCollections](https://help.aliyun.com/document_detail/2401503.html) operation to query a list of collections.
22
+
#
19
23
# This parameter is required.
20
24
self.collection=collection
25
+
# The cluster ID.
26
+
#
27
+
# > You can call the [DescribeDBInstances](https://help.aliyun.com/document_detail/196830.html) operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.
21
28
self.dbinstance_id=dbinstance_id
29
+
# The ID of the index creation job, which is returned from the `CreateIndex` operation.
30
+
#
22
31
# This parameter is required.
23
32
self.job_id=job_id
33
+
# The namespace name.
34
+
#
35
+
# > You can call the [CreateNamespace](https://help.aliyun.com/document_detail/2401495.html) operation to create a namespace and call the [ListNamespaces](https://help.aliyun.com/document_detail/2401502.html) operation to query a list of namespaces.
36
+
#
24
37
# This parameter is required.
25
38
self.namespace=namespace
39
+
# The password of the namespace.
40
+
#
41
+
# > The value of this parameter is specified when you call the CreateNamespace operation.
42
+
#
26
43
# This parameter is required.
27
44
self.namespace_password=namespace_password
28
45
self.owner_id=owner_id
46
+
# The region ID of the cluster.
47
+
#
48
+
# > You can call the [DescribeRegions](https://help.aliyun.com/document_detail/86912.html) operation to query the most recent region list.
49
+
#
29
50
# This parameter is required.
30
51
self.region_id=region_id
52
+
# The ID of the workspace that consists of multiple AnalyticDB for PostgreSQL instances. You must specify one of the WorkspaceId and DBInstanceId parameters. If you specify both parameters, the WorkspaceId parameter takes precedence.
Copy file name to clipboardExpand all lines: gpdb-20160503/alibabacloud_gpdb20160503/models/_chat_with_knowledge_base_request.py
+114Lines changed: 114 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,14 +18,24 @@ def __init__(
18
18
prompt_params: str=None,
19
19
region_id: str=None,
20
20
):
21
+
# The cluster ID.
22
+
#
23
+
# > You can call the [DescribeDBInstances](https://help.aliyun.com/document_detail/196830.html) operation to query the information about all AnalyticDB for PostgreSQL instances within a region, including instance IDs.
24
+
#
21
25
# This parameter is required.
22
26
self.dbinstance_id=dbinstance_id
27
+
# Whether to return the retrieved result. Default value: false.
# The knowledge retrieval parameter object. If you do not specify this parameter, only chat mode is enabled.
24
30
self.knowledge_params=knowledge_params
31
+
# The Large Language Model (LLM) invocation parameter object.
32
+
#
25
33
# This parameter is required.
26
34
self.model_params=model_params
27
35
self.owner_id=owner_id
36
+
# The system prompt template, which should include {{ text_chunks }},{{ user_system_prompt }},{{ graph_entities },{{ graph_relations }}. If any of these placeholders are not specified, the corresponding section should have no effect.
# The model name. See [Model Studio Document](https://help.aliyun.com/zh/model-studio/compatibility-of-openai-with-dashscope?spm=a2c4g.11186623.help-menu-2400256.d_2_10_0.45b5516eZIciC8\\&scm=20140722.H_2833609._.OR_help-T_cn~zh-V_1#eadfc13038jd5) for the available models.
# The name of the namespace. Default value: public.
448
+
#
449
+
# > You can call the [CreateNamespace](https://help.aliyun.com/document_detail/2401495.html) operation to create a namespace and call the [ListNamespaces](https://help.aliyun.com/document_detail/2401502.html) operation to query a list of namespaces.
398
450
self.namespace=namespace
451
+
# The password of the namespace.
452
+
#
453
+
# > The value of this parameter is specified when you call the CreateNamespace operation.
454
+
#
399
455
# This parameter is required.
400
456
self.namespace_password=namespace_password
457
+
# Parameters related to the knowledge base retrieval.
401
458
self.query_params=query_params
402
459
403
460
defvalidate(self):
@@ -454,15 +511,67 @@ def __init__(
454
511
top_k: int=None,
455
512
use_full_text_retrieval: bool=None,
456
513
):
514
+
# The condition that is used to filter the data to be updated. Specify this parameter in a format that is the same as the WHERE clause.
457
515
self.filter=filter
516
+
# Whether to enable knowledge graph enhancement. Default value: false.
458
517
self.graph_enhance=graph_enhance
518
+
# Returns the top number of entities and relationship edges. Default value: 60.
459
519
self.graph_search_args=graph_search_args
520
+
# The dual-path retrieval algorithm. This parameter is empty by default, which specifies that scores of vector retrieval and full-text retrieval are directly compared and sorted together.
521
+
#
522
+
# Valid values:
523
+
#
524
+
# * RRF: The reciprocal rank fusion (RRF) algorithm uses a constant k to control the fusion effect. For more information, see the description of the HybridSearchArgs parameter.
525
+
# * Weight: This algorithm uses the alpha parameter to specify the proportion of the vector search score and the full-text search score and then sorts by weight. For more information, see the description of the HybridSearchArgs parameter.
526
+
# * Cascaded: This algorithm performs first full-text retrieval and then vector retrieval.
460
527
self.hybrid_search=hybrid_search
528
+
# The parameters of the dual-path retrieval algorithm. RRF and Weight are supported at this time:
529
+
#
530
+
# * RRF: Specifies the smoothing constant k in the formula to calculate the score: `1/(k + rank_i)`. The k constant must be a positive integer greater than 1. The format:
531
+
#
532
+
# <!---->
533
+
#
534
+
# {
535
+
# "RRF": {
536
+
# "k": 60
537
+
# }
538
+
# }
539
+
#
540
+
# * Weight: The score is computed as `alpha * vector_score + (1 - alpha) * text_score`. The parameter alpha controls the weighting between vector search and full-text search scores, with a valid range of [0, 1]. 0 specifies only full-text search score. 1 specifies only vector search score.
541
+
#
542
+
# <!---->
543
+
#
544
+
# {
545
+
# "Weight": {
546
+
# "alpha": 0.5
547
+
# }
548
+
# }
461
549
self.hybrid_search_args=hybrid_search_args
550
+
# The method that is used to create vector indexes. Valid values:
551
+
#
552
+
# * l2: Euclidean distance.
553
+
# * ip: Inner product distance.
554
+
# * cosine: Cosine similarity.
462
555
self.metrics=metrics
556
+
# The retrieval window. If you specify this parameter, the context of the retrieved result is added in the output. Format: List\\<A, B>. Valid values: -10<=A<=0 and 0<=B<=10.
557
+
#
558
+
# >
559
+
#
560
+
# * We recommend that you specify this parameter if the source document is segmented into large numbers of pieces, which may result in loss of contextual information during retrieval.
561
+
#
562
+
# * Perform re-ranking before windowing.
463
563
self.recall_window=recall_window
564
+
# The rerank factor. If you specify this parameter, the search result is reranked once again. Valid values: 1\\<RerankFactor<=5.
565
+
#
566
+
# >
567
+
#
568
+
# * If the document is segmented into sparse parts, reranking is inefficient.
569
+
#
570
+
# * We recommend that the number of reranked results (the ceiling of TopK × RerankFactor) not exceed 50.
464
571
self.rerank_factor=rerank_factor
572
+
# The number of top results.
465
573
self.top_k=top_k
574
+
# Specifies whether to use full-text retrieval (dual-path retrieval). The default value is false, which means only vector retrieval is used.
0 commit comments