Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit af95f03

Browse filesBrowse files
authored
samples(discoveryengine): Add Model Prompt Spec and Model Spec to search_sample() (GoogleCloudPlatform#11274)
1 parent f832838 commit af95f03
Copy full SHA for af95f03

File tree

Expand file treeCollapse file tree

3 files changed

+9
-3
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+9
-3
lines changed

‎discoveryengine/requirements-test.txt

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
pytest==7.2.1
2-
google-api-core==2.11.1
2+
google-api-core==2.17.1

‎discoveryengine/requirements.txt

Copy file name to clipboard
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
google-cloud-discoveryengine==0.11.1
2-
google-api-core==2.11.1
1+
google-cloud-discoveryengine==0.11.8
2+
google-api-core==2.17.1

‎discoveryengine/search_sample.py

Copy file name to clipboardExpand all lines: discoveryengine/search_sample.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ def search_sample(
6868
include_citations=True,
6969
ignore_adversarial_query=True,
7070
ignore_non_summary_seeking_query=True,
71+
model_prompt_spec=discoveryengine.SearchRequest.ContentSearchSpec.SummarySpec.ModelPromptSpec(
72+
preamble="YOUR_CUSTOM_PROMPT"
73+
),
74+
model_spec=discoveryengine.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec(
75+
version="stable", # Options: stable, preview
76+
),
7177
),
7278
)
7379

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.