hellm 0.0.1 → 0.0.3

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: 75af48a7436c71030b39ada0b3acd8a74919c187816d3685715801f70bce314b
4
- data.tar.gz: 11110f4770b2b25fb4ac92a46aff9d20b1c41a26abdf0d5e0790e7e0a698be9d
3
+ metadata.gz: 85820167c185b4609e3b81e23a3280063d41c85d70c5880b9e3b676dc378a193
4
+ data.tar.gz: e24df7e76af2cae1500adfc01bc9f4ef75ffe8641acdbc8a33fad7ffc92c028a
5
5
  SHA512:
6
- metadata.gz: 958c4ccb58b11db9e67168e7cd4e1a667be90ddcc921a7585a3f40a50c0a83d36c3def47b79fa4988e61f0ec39749edf9efc7d8421f2e70b9909f97d79d9d972
7
- data.tar.gz: ad4474e9e0a64c4c9ff2c4687e3bf0c58ed40eaaf3078e42e8443ec8f62f8b6654625e4004218d0856e3c100a90e9d6ceafb791d3ba9de50255f850ca149bffb
6
+ metadata.gz: 6c0bedef17b6862c8302f14f51c3c9cdfaace1a07f40523574c9316ce6b3d775e0000edce7f83168bb7da50e1c24c5458ab29d0ce19fde3bdf1290a648e9cc53
7
+ data.tar.gz: 50342bcd317ac5427189e1318233e6902e73a80cd3d9bca2cd6521331c95d34d72cf4ae43daf72bbf181df640a4a06fa785c0673e52d96051b42c19bb296fd19
data/README.md CHANGED
@@ -48,6 +48,7 @@ hellm Alfred "Tell me your favorite color and which month fits it."
48
48
  The framework provides the following tools for agents to use:
49
49
 
50
50
  * `calculator` - a simple calculator for basic arithmetic operations.
51
+ * `web` - fetches web pages or other content from URLs.
51
52
 
52
53
 
53
54
  ### Custom Tools
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.3
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: Alfred
3
3
  description: "General purpose agent."
4
- tools: [agent]
4
+ tools: [agent, web]
5
5
  agents: [Mathematician]
6
6
  ---
7
7
 
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/bash
2
+
3
+ ../bin/hellm Alfred what products is ubity advertising on its homepage at https://ubity.io
data/lib/hellm/builder.rb CHANGED
@@ -1,8 +1,9 @@
1
+ require_relative "markdown_file"
2
+ require_relative "stream_adapter"
1
3
  require_relative "agent"
2
4
  require_relative "skill"
3
- require_relative "stream_adapter"
4
5
  require_relative "tools/skill_tool"
5
- require_relative "markdown_file"
6
+ require_relative "tools/web_tool"
6
7
 
7
8
  class Hellm::Builder
8
9
  attr_accessor :project_dir, :hellm_dir, :stream_adapter
@@ -42,6 +43,7 @@ class Hellm::Builder
42
43
  private
43
44
  def add_builtin_tools_to_registry
44
45
  Hellm::Tools::Registry.instance.add(:calculator) { Langchain::Tool::Calculator.new }
46
+ Hellm::Tools::Registry.instance.add(:web) { Hellm::Tools::WebTool.new }
45
47
  end
46
48
 
47
49
  def get_skills_from_project_dir
@@ -0,0 +1,32 @@
1
+ require "open-uri"
2
+ require "nokogiri"
3
+
4
+ module Hellm::Tools
5
+ class WebTool
6
+ extend Langchain::ToolDefinition
7
+
8
+ define_function :read, description: "Reads content from a URL. Use this function when you want to get text/binary raw data from the response, e.g. to check the HTML-code of a page." do
9
+ property :url, type: "string", description: "The URL to read from."
10
+ end
11
+
12
+ define_function :read_text, description: "Reads HTML text content from a URL. Use this function to extract text only from a HTML page." do
13
+ property :url, type: "string", description: "The URL to read from."
14
+ end
15
+
16
+ def read(url:)
17
+ URI.open(url).read
18
+ rescue StandardError => e
19
+ "Failed to read from URL #{url}: #{e.message}"
20
+ end
21
+
22
+ def read_text(url:)
23
+ html_content = URI.open(url).read
24
+ text = Nokogiri::HTML(html_content).text
25
+ lines = text.lines.map(&:strip).reject(&:empty?)
26
+ lines.join("\n")
27
+ rescue StandardError => e
28
+ "Failed to extract text from URL #{url}: #{e.message}"
29
+ end
30
+
31
+ end
32
+ end
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.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ubity UG
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.6.5
69
+ - !ruby/object:Gem::Dependency
70
+ name: nokogiri
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.19.4
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.19.4
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: google_search_results
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -81,7 +95,8 @@ dependencies:
81
95
  - !ruby/object:Gem::Version
82
96
  version: 2.2.0
83
97
  description: |
84
- Agentic framework for LLMs, allowing you to build autonomous agents that can perform complex tasks and interact with the world.
98
+ Declarative agentic framework for LLMs, allowing you to build autonomous agents that can perform complex tasks and interact with the world, without writing code.
99
+ Agents and skills are defined in markdown files, quite similar to how Github Copilot works.
85
100
  Name is inspired by the English word "helm", which refers to the steering mechanism of a ship, symbolizing guidance and direction.
86
101
  The name also evokes the idea of taking control and navigating through challenges, much like how an agentic framework empowers LLMs to make decisions and take actions autonomously.
87
102
  email:
@@ -101,7 +116,8 @@ files:
101
116
  - example/.hellm/agents/alfred.agent.md
102
117
  - example/.hellm/agents/mathematician.agent.md
103
118
  - example/.hellm/skills/farben/SKILL.md
104
- - example/example.sh
119
+ - example/example1.sh
120
+ - example/example2.sh
105
121
  - lib/hellm.rb
106
122
  - lib/hellm/agent.rb
107
123
  - lib/hellm/builder.rb
@@ -111,6 +127,7 @@ files:
111
127
  - lib/hellm/tools/agent_tool_factory.rb
112
128
  - lib/hellm/tools/registry.rb
113
129
  - lib/hellm/tools/skill_tool.rb
130
+ - lib/hellm/tools/web_tool.rb
114
131
  - lib/hellm/version.rb
115
132
  - sig/hellm.rbs
116
133
  homepage: https://gitlab.com/ubity/gems/hellm
File without changes