Skip to content

Commit

Permalink
Fix Python 3.7 compatibility issues:
Browse files Browse the repository at this point in the history
- Update string concatenation in multimodal-gemini.md
- Fix type annotation syntax in version-1.md
- Update List type annotations in chain-of-density.md
  • Loading branch information
devin-ai-integration[bot] committed Nov 24, 2024
1 parent 2f12733 commit a8c74e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 2 additions & 3 deletions docs/blog/posts/chain-of-density.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,15 @@ class RewrittenSummary(BaseModel):
...,
description="This is a new, denser summary of identical length which covers every entity and detail from the previous summary plus the Missing Entities. It should have the same length ( ~ 80 words ) as the previous summary and should be easily understood without the Article",
)
absent: List[str] = Field(
absent: typing.List[str] = Field(
...,
default_factory=list,
description="this is a list of Entities found absent from the new summary that were present in the previous summary",
)
missing: List[str] = Field(
missing: typing.List[str] = Field(
default_factory=list,
description="This is a list of 1-3 informative Entities from the Article that are missing from the new summary which should be included in the next generated summary.",
)
```

!!! tip "Using Pydantic Validators with Instructor"

Expand Down
8 changes: 5 additions & 3 deletions docs/blog/posts/multimodal-gemini.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ print(resp)
"no Kotte Ushi shop, or to have a sit-down meal at the Kitchen Hida. Finally, the video "
"recommends visiting Shirakawa-go, a World Heritage Site in Gifu Prefecture."
),
description='This video recommends a number of places to visit in Takayama city, in the Hida Region, Gifu '
'Prefecture. It shows some of the local street food and highlights some of the unique shops and restaurants in '
'the area.',
description=(
'This video recommends a number of places to visit in Takayama city, in the Hida Region, Gifu '
'Prefecture. It shows some of the local street food and highlights some of the unique shops and restaurants in '
'the area.'
),
destinations=[
TouristDestination(
name='Takayama',
Expand Down
6 changes: 3 additions & 3 deletions docs/blog/posts/version-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ client = instructor.from_litellm(litellm.completion)

# all of these will route to the same underlying create function
# allow you to add instructor to try it out, while easily removing it
client.create(model="gpt-4", response_model=Type[T]) -> T
client.chat.completions.create(model="gpt-4", response_model=Type[T]) -> T
client.messages.create(model="gpt-4", response_model=Type[T]) -> T
client.create(model="gpt-4", response_model=typing.Type[T]) -> T
client.chat.completions.create(model="gpt-4", response_model=typing.Type[T]) -> T
client.messages.create(model="gpt-4", response_model=typing.Type[T]) -> T

## Type are infered correctly

Expand Down

0 comments on commit a8c74e4

Please sign in to comment.