MCPcopy Create free account
hub / github.com/enowdev/enowX-Coder / streaming_client

Function streaming_client

src-tauri/src/services/http_client.rs:46–54  ·  view source on GitHub ↗

Build the shared `reqwest::Client` for streaming LLM responses. Keeps a long total ceiling so multi-minute completions can finish, but still bounds connect + per-read so dead connections fail fast.

()

Source from the content-addressed store, hash-verified

44/// Keeps a long total ceiling so multi-minute completions can finish,
45/// but still bounds connect + per-read so dead connections fail fast.
46pub fn streaming_client() -> AppResult<Client> {
47 Client::builder()
48 .user_agent(USER_AGENT)
49 .connect_timeout(CONNECT_TIMEOUT)
50 .read_timeout(STREAM_READ_TIMEOUT)
51 .timeout(STREAMING_TIMEOUT)
52 .build()
53 .map_err(|e| AppError::Internal(format!("Failed to build streaming HTTP client: {e}")))
54}
55
56/// Build the shared `reqwest::Client` for short, non-streaming requests
57/// (listing models, generating titles, single-shot completions).

Callers 5

streaming_client_buildsFunction · 0.85
send_openai_compatibleFunction · 0.85
send_anthropicFunction · 0.85

Calls

no outgoing calls

Tested by 1

streaming_client_buildsFunction · 0.68