instructor
instructor copied to clipboard
Out-of-date client patch
https://github.com/567-labs/instructor/blob/121f901653f92e6d718531cc2a02151d56ad5ca3/examples/resolving-complex-entities/run.py#L11
Here's the current way to patch the client:
# Initialize the OpenAI client with Instructor
client = instructor.from_openai(OpenAI())
@claude can you review all the examples that use this pattern and do instructor.from_provider() and make sure unless its not about open ai use `"openai/gpt-4o-mini"
Claude encountered an error after 19m 54s —— View job
Task: Update outdated client patch patterns in examples
Todo List:
- [x] Search for examples using old
instructor.from_openai(OpenAI())pattern - [x] Read repository guidelines from CLAUDE.md
- [x] Analyze each example to determine if it's OpenAI-specific or general
- [x] Update non-OpenAI-specific examples to use
instructor.from_provider("openai/gpt-4o-mini") - [ ] Keep OpenAI-specific examples as they are (or update appropriately)
- [ ] Run linting and formatting if available
- [ ] Commit changes to the branch
- [ ] Provide PR creation link
Progress: Updated 10 files so far
✅ Completed:
- resolving-complex-entities/run.py
- simple-extraction/user.py & maybe_user.py
- fizzbuzz/run.py
- iterables/run.py
- crm/run.py
- hooks/run.py
- logging/run.py
- parallel/run.py
- retry/run.py
Continuing with remaining ~65 files...