File tree 4 files changed +11
-5
lines changed
endpoints/getting-started
4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
1
pytest==7.2.1
2
- google-api-core==2.11 .1
2
+ google-api-core==2.17 .1
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ def search_sample(
68
68
include_citations = True ,
69
69
ignore_adversarial_query = True ,
70
70
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
+ ),
71
77
),
72
78
)
73
79
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def echo():
53
53
54
54
# [START endpoints_auth_info_backend]
55
55
def auth_info ():
56
- """Retrieves the authenication information from Google Cloud Endpoints."""
56
+ """Retrieves the authentication information from Google Cloud Endpoints."""
57
57
encoded_info = request .headers .get ("X-Endpoint-API-UserInfo" , None )
58
58
if encoded_info :
59
59
info_json = _base64_decode (encoded_info )
@@ -89,7 +89,7 @@ def auth_info_firebase():
89
89
@app .errorhandler (http_client .INTERNAL_SERVER_ERROR )
90
90
def unexpected_error (e ):
91
91
"""Handle exceptions by returning swagger-compliant json."""
92
- logging .exception ("An error occured while processing the request." )
92
+ logging .exception ("An error occurred while processing the request." )
93
93
response = jsonify (
94
94
{"code" : http_client .INTERNAL_SERVER_ERROR , "message" : f"Exception: { e } " }
95
95
)
You can’t perform that action at this time.
0 commit comments