Skip to content
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

feat(genai, generative_ai): Migration of Gemini samples to 2.X models #13267

Merged
merged 20 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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
4 changes: 1 addition & 3 deletions discoveryengine/answer_query_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# NOTE: This snippet has been partially generated by `gemini-1.5-pro-001`

# [START genappbuilder_answer_query]
from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -71,7 +69,7 @@ def answer_query_sample(
ignore_non_answer_seeking_query=False, # Optional: Ignore non-answer seeking query
ignore_low_relevant_content=False, # Optional: Return fallback answer when content is not relevant
model_spec=discoveryengine.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec(
model_version="gemini-1.5-flash-001/answer_gen/v2", # Optional: Model to use for answer generation
model_version="gemini-2.0-flash-001/answer_gen/v2", # Optional: Model to use for answer generation
),
prompt_spec=discoveryengine.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec(
preamble="Give a detailed answer.", # Optional: Natural language instructions for customizing the answer.
Expand Down
2 changes: 0 additions & 2 deletions discoveryengine/session_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# NOTE: This snippet has been partially generated by `gemini-1.5-pro-001`

# [START genappbuilder_create_session]
from google.cloud import discoveryengine_v1 as discoveryengine
Expand Down
65 changes: 0 additions & 65 deletions genai/content_cache/contentcache_create_with_txt_gcs_pdf.py

This file was deleted.

35 changes: 0 additions & 35 deletions genai/content_cache/contentcache_delete.py

This file was deleted.

42 changes: 0 additions & 42 deletions genai/content_cache/contentcache_list.py

This file was deleted.

59 changes: 0 additions & 59 deletions genai/content_cache/contentcache_update.py

This file was deleted.

42 changes: 0 additions & 42 deletions genai/content_cache/contentcache_use_with_txt.py

This file was deleted.

42 changes: 0 additions & 42 deletions genai/content_cache/noxfile_config.py

This file was deleted.

49 changes: 0 additions & 49 deletions genai/content_cache/test_content_cache_examples.py

This file was deleted.

Loading