Skip to content

Instantly share code, notes, and snippets.

View ahasha's full-sized avatar

Alex Hasha ahasha

View GitHub Profile
@ahasha
ahasha / actions.py
Last active July 15, 2024 23:56
Defining information extraction for LLMs
class Action(BaseModel):
"""Information about an action item described in the document."""
id: Optional[str] = Field(
description="If a Unique Identifier for the action is given in the text, reecord it here."
)
action_category: str = Field(
description="""
The Action Category the goal is associated with, e.g. Buildings, Transportation, Waste, Governance, Conservation, or Energy.