hellm 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e145f6843dcffe58f1bcd576ca4c945d2e9727caf765500cf228cbb44d77c9e
4
- data.tar.gz: 6ce567f6e7d01083a5a9b21b2ef82476b17e1ccbac249c201291b436f15b6055
3
+ metadata.gz: faae0266f2d1ed09940c3dc2a7bfcd78ec2fa5178182a8f97a9b4c49c49d3791
4
+ data.tar.gz: 79e9fc6d9a05a7d21326e654f9e93ac66a25123a94f46feb44a4542adee56910
5
5
  SHA512:
6
- metadata.gz: 4cfd84c50054e316c6e402f9360599bca016e3f1b8f36db599bd97f1ffe8a4bc951b110c6c462b7e9846a7485fe6394c74c72fac41391795c24e1bdbcf807322
7
- data.tar.gz: 268ad8d66f1a59e8583a46d09b06efa1114d68c6c9e182b998bb818da6e2a1b24b6519494da34695c5aba6c4d71b95bfd9563b41b9280a27935ee62240480786
6
+ metadata.gz: cc9032f38223f0d50220fbb717298da186a08d67ab9005af5568b003548e00ba075604825a76fb54572479c02507569a03a30d7e13168b43d7ed2bb5b41d31ca
7
+ data.tar.gz: c8d065bf71e6ee9696bcadd538eb5d243ccad426b2320c2e8c2a722afb569293925eab824ce2abeb9e5faf855d5c212026cfdbbab41632af6c0f3726e538ee95
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.7
data/lib/hellm/agent.rb CHANGED
@@ -26,7 +26,7 @@ class Hellm::Agent
26
26
  attr_accessor :tools
27
27
 
28
28
  def initialize(model: nil, name: nil, description: nil, session: nil, openai_api_key: nil, agents: nil, tools: nil, instructions: nil, registry: nil)
29
- model ||= "gpt-5-nano"
29
+ model ||= "gpt-5.4-nano"
30
30
  Hellm.logger.debug("Initializing agent #{name} (#{model})")
31
31
  @llm = Langchain::LLM::OpenAI.new(
32
32
  api_key: openai_api_key || ::Hellm.openai_api_key,
@@ -62,6 +62,18 @@ class Hellm::Agent
62
62
  assistant_message&.content.to_s.strip
63
63
  end
64
64
 
65
+ def chat(input_stream: $stdin, output_stream: $stdout)
66
+ output_stream.puts "Chat with agent: #{self.name}"
67
+ loop do
68
+ output_stream.print "\n> "
69
+ input = input_stream.gets&.chomp
70
+ break if input.nil? || input.downcase == "exit"
71
+ self.add(content: input)
72
+ self.run
73
+ output_stream.puts self.response
74
+ end
75
+ end
76
+
65
77
  def new_session
66
78
  @session = nil
67
79
  @assistant = nil
@@ -23,8 +23,8 @@ module Hellm::Tools
23
23
  define_singleton_method(:tool_name) { agent_name }
24
24
 
25
25
  define_function "run_agent", description: "Run the agent #{agent.name} and return its response.\n#{agent.description}" do
26
- property :content, type: "string", description: "Textual content to pass to the agent.", required: false
27
- property :image, type: "string", description: "Image URL or path to pass to the agent.", required: false
26
+ property :content, type: "string", description: "Put all content, parameters and arguments in this argument to pass it to the agent.", required: false
27
+ property :image, type: "string", description: "Image URL or path to pass to the agent. Use this only if there is the need to work with images.", required: false
28
28
  end
29
29
  end
30
30
  klass.new(agent)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hellm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ubity UG