Skip to content

Commit

Permalink
fix: Black formatting issues in documentation code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] committed Nov 24, 2024
1 parent 7ce684b commit 367d7bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
18 changes: 9 additions & 9 deletions docs/blog/posts/introducing-structured-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ 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}
```

## Why use `instructor`
Expand Down
3 changes: 2 additions & 1 deletion docs/blog/posts/version-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ 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

def create(model: str, response_model: 'Any') -> 'T': ... # type: ignore
def chat_completions_create(model: str, response_model: 'Any') -> 'T': ... # type: ignore
def messages_create(model: str, response_model: 'Any') -> 'T': ... # type: ignore
Expand Down Expand Up @@ -221,7 +222,7 @@ for user in user_stream:
#> name='John Doe' age=None
#> name='John Doe' age=30

Notice now that the type infered is `Generator[User, None]`
# Note: The return type is Generator[User, None, None]

![generator](./img/generator.png)

Expand Down

0 comments on commit 367d7bb

Please sign in to comment.