promptulate icon indicating copy to clipboard operation
promptulate copied to clipboard

stream mode supports output schema

Open Undertone0809 opened this issue 7 months ago • 2 comments

🚀 Feature Request

Now pne cannot use stream + output_schema. For example:

import pne
from pydantic import BaseModel

class LLMResponse(BaseModel):
    content: str = Field(..., description="LLM response content")

response = pne.chat(model="gpt-4o", stream=True, output_schema=LLMResponse)

It will get error if you run this example.

This feature should build after #625.

Undertone0809 avatar Jul 19 '24 17:07 Undertone0809