Commit Graph

10 Commits (620ba04c2556febbffe711ecbe37850d1ad8c159)

Author SHA1 Message Date
Lingxu 59658fb60c fix(server): default `stream` to False to comply with OpenAI spec
The OpenAI Chat Completions API defaults `stream` to false, but ChatRequest.stream
was defaulting to True. As a result, any standard OpenAI-compatible client that
omits the `stream` field receives a `text/event-stream` response where it expects
plain JSON, and fails with:

    AttributeError: 'str' object has no attribute 'choices'

Reproduce (openai==1.59.6):

    from openai import OpenAI
    c = OpenAI(base_url='http://localhost:8998/v1', api_key='none')
    c.chat.completions.create(model='minimind', messages=[{'role':'user','content':'hi'}])

curl with an explicit "stream": false returns correct JSON, confirming the handler
logic is fine and only the default value is at fault.

Explicit `stream=True` requests are unaffected.
2026-09-09 21:27:48 +08:00
jingyaogong 512eed0b65 [fix] robustness 2026-06-28 18:03:34 +08:00
jingyaogong 6b0b0c5e2f [update] fp16 inference 2026-03-27 16:29:46 +08:00
jingyaogong 101d7df2da [update] minimind-3 2026-03-25 23:57:45 +08:00
jingyaogong 08ce3da228 [feat] update args 2025-10-30 10:48:31 +08:00
jingyaogong bf123b585d [feat] add args 2025-10-30 10:05:12 +08:00
jingyaogong a62faf34bd 250426 2025-04-26 10:05:47 +08:00
jingyaogong 4a758564e4 fix top_p float bug 2025-04-09 16:52:20 +08:00
gongjy c9ca0f57dc update config 2025-02-10 00:14:11 +08:00
gongjy 58e3af0359 add minimind2 2025-02-09 23:49:47 +08:00