from parallel import Parallel
client = Parallel()
# Tip: If using Pydantic models, you can generate the schema automatically:
# class CompanyEnrichment(BaseModel):
# ceo_name: str = Field(description="Name of the CEO")
# founding_year: str = Field(description="Year the company was founded")
# output_schema = {"type": "json", "json_schema": CompanyEnrichment.model_json_schema()}
schema = client.beta.findall.enrich(
findall_id="findall_40e0ab8c10754be0b7a16477abb38a2f",
processor="core",
output_schema={
"type": "json",
"json_schema": {
"type": "object",
"properties": {
"ceo_name": {
"type": "string",
"description": "Name of the CEO"
},
"founding_year": {
"type": "string",
"description": "Year the company was founded"
}
},
"required": ["ceo_name", "founding_year"],
"additionalProperties": False
}
}
)
print(f"Enrichment added, schema: {schema.model_dump_json(indent=2)}")