Skip to content

Commit

Permalink
fix: Format code blocks in open_source.md blog post
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] committed Nov 18, 2024
1 parent 093e213 commit 0ecdba7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/blog/posts/open_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ user = create(

print(user)
#> name='Jason' age=30
"""
```

## Alternative Providers
Expand Down Expand Up @@ -192,11 +191,12 @@ import instructor
import groq
from pydantic import BaseModel

client = qrog.Groq(
client = groq.Groq(
api_key=os.environ.get("GROQ_API_KEY"),
)

# By default, the patch function will patch the ChatCompletion.create and ChatCompletion.create methods to support the response_model parameter
# By default, the patch function will patch the ChatCompletion.create and ChatCompletion.create methods
# to support the response_model parameter
client = instructor.from_openai(client, mode=instructor.Mode.MD_JSON)


Expand All @@ -218,7 +218,6 @@ user: UserExtract = client.chat.completions.create(
assert isinstance(user, UserExtract), "Should be instance of UserExtract"
print(user)
#> name='jason' age=25
"""
```

### Together AI
Expand Down Expand Up @@ -273,7 +272,9 @@ from mistralai.client import MistralClient

client = MistralClient()

patched_chat = instructor.from_openai(create=client.chat, mode=instructor.Mode.MISTRAL_TOOLS)
patched_chat = instructor.from_openai(
create=client.chat, mode=instructor.Mode.MISTRAL_TOOLS
)

class UserDetails(BaseModel):
name: str
Expand Down

0 comments on commit 0ecdba7

Please sign in to comment.