Skip to content

Commit

Permalink
Update chat_app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrants authored Dec 17, 2024
1 parent af79e3d commit 3b30669
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pydantic_ai_examples/chat_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ async def stream_messages():
return StreamingResponse(stream_messages(), media_type='text/plain')


MessageTypeAdapter: TypeAdapter[ModelMessage] = TypeAdapter(
Annotated[ModelMessage, Field(discriminator='message_kind')]
)
# MessageTypeAdapter: TypeAdapter[ModelMessage] = TypeAdapter(
# Annotated[ModelMessage, Field(discriminator='message_kind')]
# )

P = ParamSpec('P')
R = TypeVar('R')

Expand Down Expand Up @@ -223,5 +224,5 @@ async def _asyncify(
import uvicorn

uvicorn.run(
'pydantic_ai_examples.chat_app:app', reload=True, reload_dirs=[str(THIS_DIR)]
'chat_app:app', reload=True, reload_dirs=[str(THIS_DIR)]
)

0 comments on commit 3b30669

Please sign in to comment.