gemini_kg_bulk_client

Native Gemini (google.genai) client for bulk agentic KG extraction.

Uses gemini_embed_pool.next_gemini_flash_key() for API key rotation, client.aio for async I/O, and automatic function calling (AFC) with thin async callables that delegate to tools.ToolRegistry.call().

gemini_kg_bulk_client.openai_messages_to_gemini(messages)[source]

Split system instruction and build Gemini contents (no system in contents).

Return type:

tuple[str | None, list[Content]]

Parameters:

messages (list[dict[str, Any]])

class gemini_kg_bulk_client.GeminiPoolToolChatClient(*, tool_registry, model_id, max_tool_rounds=48, max_tokens=60000, max_tool_output_chars=3000000, temperature=0.25)[source]

Bases: object

Async Gemini chat with pool keys, countTokens, and AFC tool execution.

Parameters:
async close()[source]
Return type:

None

async count_input_tokens(messages, *, gemini_model=None)[source]
Return type:

int | None

Parameters:
async chat(messages, user_id='', ctx=None, tool_names=None, validate_header=False, token_count=None, on_intermediate_text=None)[source]
Return type:

str

Parameters: