Skip to content

Instantly share code, notes, and snippets.

View MaximeRivest's full-sized avatar

Maxime Rivest MaximeRivest

View GitHub Profile
import dspy
from pydantic import BaseModel, Field
from typing import Literal
# from pydantic_v2_adapter import PydanticV2Adapter # Assuming you saved the code
# 1. Define your Pydantic models
class PatientAddress(BaseModel):
street: str
city: str