INNER CODE UNIT · Python
_build_provider_request
genome-spy/genome-spy · packages/app-agent/server/app/main.py:260
def _build_provider_request(
request: AgentTurnRequest, settings: Settings
) -> ProviderRequest:
"""Build the normalized provider request from the API payload."""
return ProviderRequest(
system_prompt=settings.system_prompt,
context=request.context,
volatile_context=request.volatile_context,
history=request.history,
message=request.message,
tools=request.tools,
)
def _should_stream_response(
settings: Settings, http_request: Request, stream: bool
) -> bool:
"""Decide whether the current turn should use SSE streaming."""