Skip to content

Commit

Permalink
fix: formatting in documentation code blocks to pass Black checks
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] committed Nov 23, 2024
1 parent 5383fdc commit 9cf5ede
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ resp = client.chat.completions.create(

for person in resp:
print(person)
# > Person(name='Chris', age=27)
# > Person(name='John', age=30)
# > Person(name='Jessica', age=26)
#> Person(name='Chris', age=27)
#> Person(name='John', age=30)
#> Person(name='Jessica', age=26)
```

And that’s it! We're excited to see what you build with Instructor and Cerebras! If you have any questions about Cerebras or need to get off the API key waitlist, please reach out to [email protected].
7 changes: 3 additions & 4 deletions docs/blog/posts/pairwise-llm-judge.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ First, let's set up our environment with the necessary imports:
```python
import instructor
import openai
from pydantic import BaseModel, Field

client = instructor.from_openai(openai.OpenAI())
```
Expand Down Expand Up @@ -88,7 +87,7 @@ def judge_relevance(question: str, text: str) -> Judgment:
Before giving your final judgment, provide a justification for your decision. Explain the key factors that led to your conclusion.
Please ensure your analysis is thorough, impartial, and based on the content provided.
"""
""",
},
{
"role": "user",
Expand All @@ -103,8 +102,8 @@ def judge_relevance(question: str, text: str) -> Judgment:
<text>
{{text}}
</text>
"""
}
""",
},
],
response_model=Judgment,
context={"question": question, "text": text},
Expand Down
4 changes: 3 additions & 1 deletion docs/blog/posts/version-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ IF you know you want to pass in tempurature, seed, or model, you can do so.
import openai
import instructor

client = instructor.from_openai(openai.OpenAI(), model="gpt-4-turbo-preview", temperature=0.2)
client = instructor.from_openai(
openai.OpenAI(), model="gpt-4-turbo-preview", temperature=0.2
)
```

Now, whenever you call `client.chat.completions.create` the `model` and `temperature` will be passed to the openai client!
Expand Down

0 comments on commit 9cf5ede

Please sign in to comment.