mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-09-02 17:49:20 +00:00
Add Chat Completions API support and expand REPL debugging
- Add NearAiChatProvider using /v1/chat/completions endpoint with API key auth - Add NEARAI_API_KEY and NEARAI_API_MODE config options - Auto-detect API mode from presence of API key - Keep existing Responses API (NearAiProvider) for session-based auth - Fix response parsing to accept input_text/output_text/text content types - Expand REPL with /help, /debug toggle, colored output - Better tool status display (dots vs verbose based on debug mode) Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
74d94d33b0
commit
7ef6362d83
+7
-2
@@ -142,12 +142,17 @@ async fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
Ok(_) => {
|
||||
let _ = event_tx
|
||||
.send(AppEvent::ErrorMessage("No models available from API".into()))
|
||||
.send(AppEvent::ErrorMessage(
|
||||
"No models available from API".into(),
|
||||
))
|
||||
.await;
|
||||
}
|
||||
Err(e) => {
|
||||
let _ = event_tx
|
||||
.send(AppEvent::ErrorMessage(format!("Failed to fetch models: {}", e)))
|
||||
.send(AppEvent::ErrorMessage(format!(
|
||||
"Failed to fetch models: {}",
|
||||
e
|
||||
)))
|
||||
.await;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user