Skip to content

Commit

Permalink
fix: update code block formatting for Python 3.7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] committed Nov 24, 2024
1 parent 708d125 commit 5097c5b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 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
22 changes: 11 additions & 11 deletions docs/blog/posts/multimodal-gemini.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ print(resp)

```python
Recomendations(
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.",
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
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=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
client.create(model="gpt-4", response_model=typing.Type[T]) # type: ignore[return]
client.chat.completions.create(model="gpt-4", response_model=typing.Type[T]) # type: ignore[return]
client.messages.create(model="gpt-4", response_model=typing.Type[T]) # type: ignore[return]

## Type are infered correctly

Expand Down

0 comments on commit 5097c5b

Please sign in to comment.