tests.system.google.cloud.gen_ai.example_gen_ai_generative_model

Example Airflow DAG for Google Gen AI Generative Model prompting.

Attributes

ENV_ID

GEMINI_API_KEY

MODELS

PROJECT_ID

DAG_ID

REGION

PROMPT

CONTENTS

TEXT_EMBEDDING_MODEL

MULTIMODAL_MODEL

MEDIA_GCS_PATH

MIME_TYPE

TOOLS

GENERATION_CONFIG_CREATE_CONTENT

EVAL_DATASET

REGION_GLOBAL

EXPERIMENT_NAME

EXPERIMENT_RUN_NAME

PROMPT_TEMPLATE

CACHED_MODEL

CACHED_SYSTEM_INSTRUCTION

CACHED_CONTENT_CONFIG

test_run

Functions

get_gemini_api_key()

Module Contents

tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.ENV_ID[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.GEMINI_API_KEY = 'api_key'[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.MODELS = "{{ task_instance.xcom_pull('get_actual_models') }}"[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.PROJECT_ID[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.DAG_ID = 'gen_ai_generative_model_dag'[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.REGION = 'us-central1'[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.PROMPT = 'In 10 words or less, why is Apache Airflow amazing?'[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.CONTENTS[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.TEXT_EMBEDDING_MODEL = "{{ task_instance.xcom_pull('get_actual_models')['text-embedding'] }}"[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.MULTIMODAL_MODEL = "{{ task_instance.xcom_pull('get_actual_models')['multimodal'] }}"[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.MEDIA_GCS_PATH = 'gs://download.tensorflow.org/example_images/320px-Felis_catus-cat_on_snow.jpg'[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.MIME_TYPE = 'image/jpeg'[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.TOOLS[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.GENERATION_CONFIG_CREATE_CONTENT[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.EVAL_DATASET[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.REGION_GLOBAL = 'global'[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.EXPERIMENT_NAME = ''[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.EXPERIMENT_RUN_NAME = ''[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.PROMPT_TEMPLATE = '{instruction}. Article: {context}. Summary:'[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.CACHED_MODEL = "{{ task_instance.xcom_pull('get_actual_models')['cached-model'] }}"[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.CACHED_SYSTEM_INSTRUCTION = Multiline-String[source]
Show Value
"""
You are an expert researcher. You always stick to the facts in the sources provided, and never make up new facts.
Now look at these research papers, and answer the following questions.
"""
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.CACHED_CONTENT_CONFIG[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.get_gemini_api_key()[source]
tests.system.google.cloud.gen_ai.example_gen_ai_generative_model.test_run[source]

Was this entry helpful?