Skip to content

Commit

Permalink
Fix Black formatting issues for Python 3.7 compatibility:
Browse files Browse the repository at this point in the history
- Update string concatenation in multimodal-gemini.md
- Fix comment formatting in introducing-structured-outputs.md (#> instead of # >)
- Update type annotation syntax in version-1.md
  • Loading branch information
devin-ai-integration[bot] committed Nov 24, 2024
1 parent 08b95b6 commit 0c2fbc2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 35 deletions.
36 changes: 18 additions & 18 deletions docs/blog/posts/introducing-structured-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,24 +117,24 @@ with client.beta.chat.completions.stream(
for event in stream:
if event.type == "content.delta":
print(event.snapshot, flush=True, end="\n")
# > {"
# > {"name
# > {"name":"
# > {"name":"Jason
# > {"name":"Jason","
# > {"name":"Jason","age
# > {"name":"Jason","age":
# > {"name":"Jason","age":25
# > {"name":"Jason","age":25}
# > {"
# > {"name
# > {"name":"
# > {"name":"Jason
# > {"name":"Jason","
# > {"name":"Jason","age
# > {"name":"Jason","age":
# > {"name":"Jason","age":25
# > {"name":"Jason","age":25}
#>"{"
#>"{"name
#>"{"name":"
#>"{"name":"Jason
#>"{"name":"Jason","
#>"{"name":"Jason","age
#>"{"name":"Jason","age":
#>"{"name":"Jason","age":25
#>"{"name":"Jason","age":25}
#>"{"
#>"{"name
#>"{"name":"
#>"{"name":"Jason
#>"{"name":"Jason","
#>"{"name":"Jason","age
#>"{"name":"Jason","age":
#>"{"name":"Jason","age":25
#>"{"name":"Jason","age":25}

### Unpredictable Latency Spikes

Expand Down
24 changes: 10 additions & 14 deletions docs/blog/posts/multimodal-gemini.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,17 @@ print(resp)

```python
Recomendations(
chain_of_thought=(
"The video recommends visiting Takayama city, in the Hida Region, Gifu Prefecture. "
"The video suggests visiting the Miyagawa Morning Market, to try the Sarubobo good luck charms, "
"and to enjoy the cookie cup espresso, made by Koma Coffee. Then, the video suggests visiting "
"a traditional Japanese Cafe, called Kissako Katsure, and try their matcha and sweets. "
"Afterwards, the video suggests to visit the Sanmachi Historic District, where you can find "
"local crafts and delicious foods. The video recommends trying Hida Wagyu beef, at the Kin "
"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 "
chain_of_thought="The video recommends visiting Takayama city, in the Hida Region, Gifu Prefecture. \n"
"The video suggests visiting the Miyagawa Morning Market, to try the Sarubobo good luck charms, \n"
"and to enjoy the cookie cup espresso, made by Koma Coffee. Then, the video suggests visiting \n"
"a traditional Japanese Cafe, called Kissako Katsure, and try their matcha and sweets. \n"
"Afterwards, the video suggests to visit the Sanmachi Historic District, where you can find \n"
"local crafts and delicious foods. The video recommends trying Hida Wagyu beef, at the Kin \n"
"no Kotte Ushi shop, or to have a sit-down meal at the Kitchen Hida. Finally, the video \n"
"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."
),
"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=typing.Type[typing.TypeVar("T")]) -> typing.TypeVar("T")
client.chat.completions.create(model="gpt-4", response_model=typing.Type[typing.TypeVar("T")]) -> typing.TypeVar("T")
client.messages.create(model="gpt-4", response_model=typing.Type[typing.TypeVar("T")]) -> typing.TypeVar("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 0c2fbc2

Please sign in to comment.