Skip to content

Commit bbacb42

Browse files
Copilotowndev
andcommitted
Initial plan for thinking levels and budgets support
Co-authored-by: owndev <69784886+owndev@users.noreply.github.com>
1 parent 311f44a commit bbacb42

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

filters/vertex_ai_search_tool.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@ def inlet(self, body: dict) -> dict:
4141
"vertex_ai_search enabled but vertex_rag_store not provided in params or VERTEX_AI_RAG_STORE env var"
4242
)
4343
return body
44-

pipelines/google/google_gemini.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ async def _build_image_generation_contents(
426426
{
427427
"index": i + 1,
428428
"label": (
429-
f"Image {i+1}" if self.valves.IMAGE_ADD_LABELS else str(i + 1)
429+
f"Image {i + 1}" if self.valves.IMAGE_ADD_LABELS else str(i + 1)
430430
),
431431
"reused": reused_flags[i],
432432
"origin": "history" if reused_flags[i] else "current",
@@ -1429,11 +1429,15 @@ def _configure_generation(
14291429
or os.getenv("VERTEX_AI_RAG_STORE")
14301430
)
14311431
if vertex_rag_store:
1432-
self.log.debug(f"Enabling Vertex AI Search grounding: {vertex_rag_store}")
1432+
self.log.debug(
1433+
f"Enabling Vertex AI Search grounding: {vertex_rag_store}"
1434+
)
14331435
gen_config_params.setdefault("tools", []).append(
14341436
types.Tool(
14351437
retrieval=types.Retrieval(
1436-
vertex_ai_search=types.VertexAISearch(datastore=vertex_rag_store)
1438+
vertex_ai_search=types.VertexAISearch(
1439+
datastore=vertex_rag_store
1440+
)
14371441
)
14381442
)
14391443
)
@@ -1470,7 +1474,9 @@ def _format_grounding_chunks_as_sources(
14701474
"uri": getattr(context, "uri", None),
14711475
},
14721476
"document": [getattr(context, "chunk_text", None) or ""],
1473-
"metadata": [{"source": getattr(context, "title", None) or "Document"}],
1477+
"metadata": [
1478+
{"source": getattr(context, "title", None) or "Document"}
1479+
],
14741480
}
14751481
)
14761482
elif hasattr(chunk, "web") and chunk.web:

0 commit comments

Comments
 (0)