You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we cannot enable stream if setting output schema. Eg:
fromtypingimportListimportpromptulateaspnefrompydanticimportBaseModel, FieldclassLLMResponse(BaseModel):
provinces: List[str] =Field(description="All provinces in China")
response: LLMResponse=pne.chat(
messages="Please tell me all provinces in China.",
output_schema=LLMResponse,
model="gpt-4-1106-preview",
stream=True,
)
print(response.provinces)
Need to build a json parser to parse stream type json data like this:
The text was updated successfully, but these errors were encountered:
馃殌 Feature Request
Currently, we cannot enable stream if setting output schema. Eg:
Need to build a json parser to parse stream type json data like this:
The text was updated successfully, but these errors were encountered: