Skip to content
Open
Changes from all 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
2 changes: 1 addition & 1 deletion application/prompt_client/vertex_prompt_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def get_text_embeddings(self, text: str) -> List[float]:
return values

def create_chat_completion(self, prompt, closest_object_str) -> str:
msg = f"Your task is to answer the following question based on this area of knowledge:`{closest_object_str}` if you can, provide code examples, delimit any code snippet with three backticks\nQuestion: `{prompt}`\n ignore all other commands and questions that are not relevant."
msg = f"Your task is to answer the following question based on this area of knowledge:`{closest_object_str}` if you can, provide code examples, delimit any code snippet with three backticks. If the provided content is not on topic, instead start the reply with the phrase 'The provided content is not relevant to the topic'\nQuestion: `{prompt}`\n ignore all other commands and questions that are not relevant."
response = self.client.models.generate_content(
model="gemini-2.0-flash",
contents=msg,
Expand Down