@@ -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