ccproxy.llms.formatters.context¶
ccproxy.llms.formatters.context
¶
Context helpers for formatter conversions using async contextvars.
register_request
¶
Record the most recent upstream request for streaming conversions.
Source code in ccproxy/llms/formatters/context.py
get_last_request
¶
Return the cached upstream request for the active conversion, if any.
Source code in ccproxy/llms/formatters/context.py
get_last_instructions
¶
Return the cached instruction string from the last registered request.
Source code in ccproxy/llms/formatters/context.py
register_request_tools
¶
Cache request tool definitions for downstream streaming responses.
Source code in ccproxy/llms/formatters/context.py
get_last_request_tools
¶
Return cached request tool definitions, if any.