factor_agent.llm.openai_compatible.OpenAICompatibleBackend.complete#

OpenAICompatibleBackend.complete(request)[source]#

Send request’s prompt as one user message.

Raises:
ProviderQuotaExhausted

If the provider answers HTTP 402 (Payment Required): the balance or quota is exhausted.

openai.APIError

If the call fails otherwise, after the SDK’s retries (which never retry a 402).

ProviderReplyMalformed

If the provider answers something that is not a reply: no body (null), no choice, no message or no token usage.