mirror of
https://github.com/ollama/ollama-python.git
synced 2026-08-15 01:17:47 +00:00
fix: structured outputs example (#364)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user