Sha256: 4f1b1daa281d6ce62f792c6fc553db94d6c1e34ea67c8bd8fce982bc605fc4c7
Contents?: true
Size: 1.68 KB
Versions: 4
Compression:
Stored size: 1.68 KB
Contents
module OpenAISwarm class Agent attr_accessor :name, :model, :instructions, :functions, :tool_choice, :parallel_tool_calls, :strategy, :noisy_tool_calls, :temperature, :current_tool_name, :resource # These attributes can be read and written externally. They include: # - name: The name of the agent. # - model: The model used, e.g., "gpt-4". # - resource: Additional custom parameters or data that the agent might need. # - noisy_tool_calls: is an array that contains the names of tool calls that should be excluded because they are considered "noise". # These tool calls generate irrelevant or unnecessary messages that the agent should not send to OpenAI. # When filtering messages, any message that includes these tool calls will be removed from the list, preventing them from being sent to OpenAI. def initialize( name: "Agent", model: "gpt-4", instructions: "You are a helpful agent.", functions: [], tool_choice: nil, temperature: nil, parallel_tool_calls: true, resource: nil, noisy_tool_calls: [], strategy: {}, current_tool_name: nil ) @name = name @model = model @instructions = instructions @functions = functions @tool_choice = tool_choice @temperature = temperature @parallel_tool_calls = parallel_tool_calls @resource = resource @noisy_tool_calls = noisy_tool_calls @strategy = Agents::StrategyOptions.new(strategy) @current_tool_name = current_tool_name.nil? ? nil : current_tool_name.to_s end end end
Version data entries
4 entries across 4 versions & 1 rubygems