Sha256: 470730d1f77ea1255dd254c9ce20d2f0a267a722456283de02916343d3c69abc
Contents?: true
Size: 985 Bytes
Versions: 5
Compression:
Stored size: 985 Bytes
Contents
module Sublayer module Agents class GenerateCodeGivenDescriptionAgent include Sublayer::Capabilities::LLMAssistance include Sublayer::Capabilities::HumanAssistance attr_reader :description, :technologies, :results llm_result_format type: :single_string, name: "generated_code", description: "The generated code in the requested language" def initialize(description:, technologies:) @description = description @technologies = technologies end def execute @results = human_assistance_with(llm_generate) end def prompt <<-PROMPT You are an expert programmer in #{technologies.join(", ")}. You are tasked with writing code using the following technologies: #{technologies.join(", ")}. The description of the task is #{description} Take a deep breath and think step by step before you start coding. PROMPT end end end end
Version data entries
5 entries across 5 versions & 1 rubygems