Skip to main content

Module vlm

Module vlm 

Source

Structsยง

AccumulatedToolCall ๐Ÿ”’
FnCall
FnDef ๐Ÿ”’
Message
One message in an OpenAI Chat Completions conversation. Spec: https://platform.openai.com/docs/api-reference/chat/create#chat/create-messages
ToolCall
ToolDef
VlmClient
Direct HTTP client for an OpenAI-compatible chat-completions endpoint. Cheap to clone โ€” async_openai::Client wraps a reqwest::Client (an Arc<...> internally). No mutex needed when sharing across tasks.
VlmUsage

Enumsยง

VlmStreamItem
Item yielded by the chat completion stream. planner.rs matches on this enum to drive token streaming, tool dispatch, and finish handling.

Constantsยง

MAX_OPEN_RETRIES ๐Ÿ”’

Functionsยง

build_openai_messages ๐Ÿ”’
build_openai_tools ๐Ÿ”’
open_retry_delay ๐Ÿ”’
parse_usage ๐Ÿ”’
Read the standard Chat Completions usage shape without requiring every OpenAI-compatible provider to deserialize optional detail fields equally.
process_stream_line ๐Ÿ”’
rejects_optional_request_fields ๐Ÿ”’
Compatibility fallback is only safe when a client-error response names an optional field that Pilot added. Unrelated 4xx responses must retain their original diagnosis instead of being retried with a misleading warning.