Undertone0809 / promptulate

🚀Lightweight Large language model automation and Autonomous Language Agents development framework. Build your LLM Agent Application in a pythonic way!
https://promptulate.cn/
Apache License 2.0
333 stars 34 forks source link

stream mode supports output schema #801

Open Undertone0809 opened 4 months ago

Undertone0809 commented 4 months ago

🚀 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 commented 3 months ago

625

Issues-translate-bot commented 3 months ago

Bot detected the issue body's language is not English, translate it automatically.


625