Skip to content

Add support for background requests #4

@raghubetina

Description

@raghubetina

It would be neat to add support for OpenAI API requests with background: true, for e.g. very long requests (e.g. to o3-deep-research. I envision something like this:

c = AI::Chat.new
c.model = "o3-deep-research"
c.background = true
c.system("You are a brilliant Dungeon Master. Write a detailed murder mystery set in Middle Earth. You will refer to
these notes later when you take players on an adventure. Players will not see these notes.")
c.generate!
# We send a request with background: true. Then we poll every 15 seconds until it is complete. Then we proceed as normal; adding the message, creating the response, etc.
c.model = "o3"
c.background = false
c.user("I'm ready to start the adventure!")
c.generate!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions