Skip to content

Conversation

@elliotb
Copy link

@elliotb elliotb commented Jan 12, 2025

OpenAI's o1 series of models require that the "system" messages are passed with a role of "developer", rather than "system".

While the developer can pass their initial set of messages with the correct role, the messages generated by Instructor for things such as validation retries were always sent with a "system" role, and rejected by the API.

This PR introduces an additional option to the chat_completion function, allowing overriding the role used for these messages, specified as :instructor_role that defaults to "system".

@gordalina
Copy link

@elliotb you need to drop the instructor_role in all the adapters: gordalina@58b0194

@elliotb
Copy link
Author

elliotb commented Feb 21, 2025

@elliotb you need to drop the instructor_role in all the adapters: gordalina@58b0194

Thanks, I've updated the adapters that follow this pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants