Sha256: 88c751e6b393d211c88c014ec4067003b28fe86f0dbb3ead535d50c781dabd83

Contents?: true

Size: 614 Bytes

Versions: 1

Compression:

Stored size: 614 Bytes

Contents

# frozen_string_literal: true

module Please
  Request = Struct.new(:options, :instruction, :codex_service, keyword_init: true) do
    def send
      codex_service.completion(<<~PROMPT.chomp).strip
        Write a one-line bash command each of the following tasks.

        # Print the current working directory
        $ pwd
        #{`pwd`}

        # Show information about the operating system
        $ uname -a
        #{`uname -a`}
      
        # List all files in the current directory
        $ ls -a
        #{`ls -a`}

        # #{instruction.gsub(/\n/, " ")}
        $
      PROMPT
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openai-please-0.1.0 lib/please/request.rb