Undertone0809 / promptulate

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

stream mode supports output schema #801

Open Undertone0809 opened 1 month ago

Undertone0809 commented 1 month 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 1 month ago

625

Issues-translate-bot commented 1 month ago

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


625