mirror of
https://github.com/ollama/ollama-python.git
synced 2026-01-13 21:57:16 +08:00
fix: structured outputs example (#364)
This commit is contained in:
parent
1066246ab5
commit
70dd0b7e63
@ -2,14 +2,13 @@ from pathlib import Path
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Optional, Literal
|
||||
from ollama import chat
|
||||
from rich import print
|
||||
|
||||
|
||||
# Define the schema for image objects
|
||||
class Object(BaseModel):
|
||||
name: str
|
||||
confidence: float
|
||||
attributes: Optional[dict] = None
|
||||
attributes: str
|
||||
|
||||
|
||||
class ImageDescription(BaseModel):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user