Releases: instructor-ai/instructor
Releases · instructor-ai/instructor
0.4.4
What's Changed
- Add logging.error for Retry logic by @jxnl in #259
- Update contributing.md by @tadash10 in #241
- Adds ruff linting and formatting by @ggaabe in #262
- Json mode nested models by @shanktt in #263
- Fix async streaming by @Anmol6 in #261
- Add multitask tests by @jxnl in #265
- Parse availability of dates by @jxnl in #267
- Integrate and Enhance Type Checking with Mypy by @gao-hongnan in #264
- Add new Mode for Anyscale's json schema schema type by @jxnl in #273
- Revert "Add new Mode for Anyscale's json schema schema type " by @jxnl in #274
- Support JSON_OBJECT mode from Anyscale by @jxnl in #275
- Updates to Tutorials by @jxnl in #248
- added finish reason exception IncompleteOutputException by @ionflow in #279
- doc: small change to readablity. by @Tedfulk in #281
- feat: add debugging for retries by @jxnl in #283
- blog: Third party models by @Anmol6 in #284
New Contributors
- @tadash10 made their first contribution in #241
- @ggaabe made their first contribution in #262
- @shanktt made their first contribution in #263
- @gao-hongnan made their first contribution in #264
- @ionflow made their first contribution in #279
- @Tedfulk made their first contribution in #281
Full Changelog: 0.4.2...0.4.3
0.4.2
What's Changed
- Opensource examples - Runpod w/Text-Generation-WebUI API Endpoint by @PhiBrandon in #247
- Fixed the system prompt for JSON mode, enabling the use of Pydantic nested models by @aastroza in #249
- Fix "seperate" typo by @toolittlecakes in #251
- added missing angle bracket by @toolittlecakes in #252
- Small doc fix for FastAPI section by @waseemhnyc in #253
New Contributors
- @toolittlecakes made their first contribution in #251
- @waseemhnyc made their first contribution in #253
Full Changelog: 0.4.1...0.4.2
0.4.1
What's Changed
- Fixed up missing dependencies and updated README.md by @ivanleomk in #232
- generator blog post by @Anmol6 in #230
- Update caching.md by @MeDott29 in #233
- Adding Open Router inference Example by @PhiBrandon in #226
- add: fastpi to concepts by @Muhtasham in #234
- Generator blog: small formatting by @Anmol6 in #237
- ref fastapi in generator.md by @Anmol6 in #240
- Opensource examples by @PhiBrandon in #238
- Fixed 1 spelling error in docs by @AlexTelon in #236
- chore: add grit pattern enforcement by @morgante in #243
- Fix #244 -- Refactor dump_message function to force content key by @Guiforge in #245
- Markdown JSON Mode by @Anmol6 in #246
- Documentation: Update planning-tasks.md by @taziksh in #250
New Contributors
- @PhiBrandon made their first contribution in #226
- @Muhtasham made their first contribution in #234
- @AlexTelon made their first contribution in #236
- @morgante made their first contribution in #243
- @Guiforge made their first contribution in #245
- @taziksh made their first contribution in #250
Full Changelog: 0.4.0...0.4.1
0.4.0
Many Improvements were made:
- Multitask is swapped with Iterable[T]
- More validations like content moderation
- Supporting tool_call and JSON_MODE via the Mode patch.
What's Changed
- small fixes to tutorials by @fpingham in #168
- first version validation tutorial by @fpingham in #180
- Tutorials creative acts in documentation by @MeDott29 in #191
- Update index.md by @OxfordOutlander in #199
- Add coveralls by @jxnl in #203
- Ivan/tutorial cod by @ivanleomk in #193
- small fixes to tutorials by @fpingham in #205
- Minor corrections to jupyter notebooks by @aastroza in #206
- Openai mod validator by @fpingham in #207
- doc: add missing imports to some examples in README.md by @tavisrudd in #215
- Add multiple modalities: tools, functions, json_mode by @jxnl in #218
- Blog: Mastering Caching by @jxnl in #219
- Split coverage by @jxnl in #222
- Add client test fixtures by @jxnl in #227
- Support Streaming MultiTask with response_model by @Anmol6 in #221
- Add braintrust proxy by @ankrgyl in #225
New Contributors
- @OxfordOutlander made their first contribution in #199
- @aastroza made their first contribution in #206
- @tavisrudd made their first contribution in #215
- @Anmol6 made their first contribution in #221
- @ankrgyl made their first contribution in #225
Full Changelog: 0.3.5...0.4.0
0.3.5
What's Changed
- Spelling fix - chain-of-density.md by @mitch-36 in #176
- Fix llm_validator by @jxnl in #179
- Fix async usage by @Omegastick in #167
- Fix syntax error in code example by @smuotoe in #182
- Blog on learning some async options by @jxnl in #177
- improve documentation Readme by @jxnl in #186
- Correct typo by @daaniyaan in #170
- Creative acts in documentation by @MeDott29 in #188
- Improve Documentation by @jxnl in #189
- Add tutorials by @jxnl in #154
- Examples of using LLMs for citation verification by @jxnl in #192
- Update 2.tips.ipynb by @daaniyaan in #194
- RFC how much detail is too much? by @MeDott29 in #198
New Contributors
- @mitch-36 made their first contribution in #176
- @Omegastick made their first contribution in #167
- @smuotoe made their first contribution in #182
Full Changelog: 0.3.4...0.3.5
0.3.4
What's Changed
- Fix typo by @Xeophon in #173
- fixes retry_async message unpacking by @bradenkinard in #175
New Contributors
- @Xeophon made their first contribution in #173
- @bradenkinard made their first contribution in #175
Full Changelog: 0.3.3...0.3.4
0.3.3
What's Changed
- Added support for model suffix and added migrations for new OpenAI SDK by @ivanleomk in #169
- Chain of density by @ivanleomk in #135
- Chain of density edits by @ivanleomk in #171
Full Changelog: 0.3.2...0.3.3
0.3.2
0.3.1
Full Changelog: 0.3.0...0.3.1
FIxed issues with classmethod
0.3.0
Upgrading to openai 1.1.0
Usage
from openai import OpenAI()
import instructor
# Enables `response_model`
client = instructor.patch(OpenAI())
class UserDetail(BaseModel):
name: str
age: int
user = client.chat.completions.create(
model="gpt-3.5-turbo",
response_model=UserDetail,
messages=[
{"role": "user", "content": "Extract Jason is 25 years old"},
]
)
assert isinstance(user, UserDetail)
assert user.name == "Jason"
assert user.age == 25
note "Using openai<1.0.0
"
If you're using openai<1.0.0
then make sure you pip install instructor<0.3.0
where you can patch a global client like so:
import openai
import instructor
instructor.patch()
user = openai.ChatCompletion.create(
...,
response_model=UserDetail,
)
What's Changed
- Migration to OpenAI 1.1.0 by @grit-app in #152
New Contributors
- @grit-app made their first contribution in #152
Full Changelog: 0.2.11...0.3.0