Skip to content

Releases: instructor-ai/instructor

0.4.1

04 Dec 21:53
8d3c255
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.4.0...0.4.1

0.4.0

27 Nov 00:38
Compare
Choose a tag to compare

Many Improvements were made:

  1. Multitask is swapped with Iterable[T]
  2. More validations like content moderation
  3. Supporting tool_call and JSON_MODE via the Mode patch.

What's Changed

New Contributors

Full Changelog: 0.3.5...0.4.0

0.3.5

19 Nov 21:09
c3330a7
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.3.4...0.3.5

0.3.4

13 Nov 23:52
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.3.3...0.3.4

0.3.3

13 Nov 16:40
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.3.2...0.3.3

0.3.2

11 Nov 21:26
3d2035b
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @bnkc made their first contribution in #160

Full Changelog: 0.3.1...0.3.2

0.3.1

09 Nov 14:25
Compare
Choose a tag to compare

Full Changelog: 0.3.0...0.3.1

FIxed issues with classmethod

0.3.0

08 Nov 20:24
Compare
Choose a tag to compare

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

0.3.0rc

07 Nov 00:29
Compare
Choose a tag to compare
0.3.0rc Pre-release
Pre-release

Release candidate for OpenAI 1.0

Full Changelog: 0.2.11...0.3.0rc

0.2.11

06 Nov 22:03
Compare
Choose a tag to compare

What's Changed

  • Add File Validation and Hyperparameters Support to CLI by @daaniyaan in #151

Typos

New Contributors

Full Changelog: 0.2.10...0.2.11