Spaces:
Sleeping
Sleeping
Commit History
-
fix(agent): use non-streaming completion for LLM code generationβ
genspark-ai-developerTest D revealed that streamed-and-concat of SambaNova tokens at temp=0.1 sometimes produced interleaved/garbled Python (SyntaxError on \"unterminated string literal\"). The streaming itself is fine for prose, but for code we want exact byte-perfect output. Fix: introduce _complete_once() β one-shot non-streaming completion supporting OpenAI-compatible, Gemini generateContent, and Anthropic Messages APIs. llm_generate_code() now iterates providers and uses _complete_once with temperature=0.0 for deterministic code output. Direct /api/v1/chat streaming and /api/v1/execute are unchanged and continue to stream token-by-token / line-by-line.103c581 -
feat(phase1): rebuild backend on FastAPI + E2B + SSE (stability-first)β
genspark-ai-developerComplete Phase-1 rebuild per spec: one stable pipeline, real execution, no fake Computer Use. Backend (backend/app.py β single ~530-line module): - GET /health: real status (E2B + provider availability) - POST /api/v1/chat (SSE): LLM-only streaming, NO sandbox * Providers in order: SambaNova β Groq β GitHub Models β OpenAI β Anthropic β Gemini * Stable text-only streaming, no fragile tool-calling - POST /api/v1/execute (SSE): REAL E2B sandbox execution * Streams sandbox_ready β stdout/stderr β result events live * Per-session sandbox reuse (warm restart ~88ms vs 400ms cold) * Accepts {language, code} OR legacy {tool, args} * Local subprocess fallback if E2B unavailable - POST /api/v1/agent (SSE): intent-routed (chat OR execute) * Keyword + code-block heuristic, LLM code generation when needed - POST /api/v1/orchestrate, /api/v1/kernel/orchestrate, /api/v1/chat/stream: legacy aliases for frontend backward-compat - GET/DELETE /api/v1/sandbox/{session_id}: lifecycle - WS β¦bb9b14c