Skip to content

Switch from system prompt to instructions #10

Description

@simonw

I'm currently using the old system prompt messages:

def _build_messages(self, prompt, conversation):
messages = []
current_system = None
image_detail = None
if self.vision:
image_detail = prompt.options.image_detail or "low"
if conversation is not None:
for prev_response in conversation.responses:
if (
prev_response.prompt.system
and prev_response.prompt.system != current_system
):
messages.append(
{"role": "system", "content": prev_response.prompt.system}
)
current_system = prev_response.prompt.system

Should switch that over to using "instructions" instead: https://platform.openai.com/docs/api-reference/responses/create#responses-create-instructions

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions