Skip to content

stream mode is not supported #209

@AkisAya

Description

@AkisAya

Describe the bug
when i request with a stream option like this

{
    "model": "auto",
    "messages": [
        {
            "role": "user",
            "content": "what is H20"
        }
    ],
    "stream": true
}

the response is still a blocking response

To Reproduce
add "stream": true to request body

Expected behavior
return text/event response body

Screenshots

Image

Additional context
i found openai.ChatCompletionNewParams in openai-go sdk has no Stream field , so the parse logic in handleRequestBody lose the user input stream: true option

// parseOpenAIRequest parses the raw JSON using the OpenAI SDK types
func parseOpenAIRequest(data []byte) (*openai.ChatCompletionNewParams, error) {
	var req openai.ChatCompletionNewParams
	if err := json.Unmarshal(data, &req); err != nil {
		return nil, err
	}
	return &req, nil
}

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions