Skip to content

feat(discoveryengine): Add user pseudo id to answer query sample #13514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 30, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions discoveryengine/answer_query_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def answer_query_sample(
session=None, # Optional: include previous session ID to continue a conversation
query_understanding_spec=query_understanding_spec,
answer_generation_spec=answer_generation_spec,
user_pseudo_id="user-pseudo-id", # Optional: Add user pseudo-identifier for queries.
)

# Make the request
Expand Down
11 changes: 7 additions & 4 deletions discoveryengine/documents_sample_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@

import os

from discoveryengine import import_documents_sample
from discoveryengine import list_documents_sample
from discoveryengine import purge_documents_sample

import pytest

from discoveryengine import (
import_documents_sample,
list_documents_sample,
purge_documents_sample,
)

project_id = os.environ["GOOGLE_CLOUD_PROJECT"]
location = "global"
data_store_id = "test-structured-data-engine"


@pytest.mark.skip(reason="Table deleted.")
def test_import_documents_bigquery():
# Empty Dataset
bigquery_dataset = "genappbuilder_test"
Expand Down