Tracing Google Gen AI with VertexAI Operator in Python Code
Can I trace Google Gen AI with the VertexAI operator? An example of my code
import os
import google.generativeai as genai
genai.configure(api_key=os.environ["GEMINI_API_KEY"])
# Create the model
generation_config = {
"temperature": 1,
"top_p": 0.95,
"top_k": 40,
"max_output_tokens": 8192,
"response_mime_type": "text/plain",
}
model = genai.GenerativeModel(
model_name="gemini-1.5-pro",
generation_config=generation_config,
system_instruction="You're a bot which generates only SSML output based on the question. Include pauses and make it a conversation between two people in a podcast. Use US Voices and add hmmm and umm and make the voices talk over each other. Donot include intro and outro music.",
)
chat_session = model.start_chat(
history=[])
response = chat_session.send_message("INSERT_INPUT_HERE")
print(response.text)