ruby_llm 0.1.0.pre17 → 0.1.0.pre18
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 +4 -4
- data/README.md +1 -1
- data/lib/ruby_llm/chat.rb +3 -1
- data/lib/ruby_llm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb34b8e16d243dfdc95d7fc6a70a67ecb2afac895da5a646e57dbc915da0a8e9
|
4
|
+
data.tar.gz: 6e95fb39b3670a38422b0dd79ec97263c34e6143751fef2272a6401ccac79c95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af33908a0ff937c4a7d0b074b4406c4211456dbb92c39d5c2237ca6463f3bd8129141a4b2c23270da85fbf90d26c0e8c6b295aaedb8574a23e0ab3eb107abd39
|
7
|
+
data.tar.gz: c6ce63d8d361fffcfaf6bfa2fbdea1df42ddf75e2969d68c5f789fbb14fccb61284c9a6b46fb0c0472c0e18cb31da150544b3cf2e9af4a1e53039a164b4d3e9f
|
data/README.md
CHANGED
@@ -82,7 +82,7 @@ Need vector embeddings for your text? RubyLLM makes it simple:
|
|
82
82
|
|
83
83
|
```ruby
|
84
84
|
# Get embeddings with the default model
|
85
|
-
vector = RubyLLM.embed
|
85
|
+
vector = RubyLLM.embed "Hello, world!"
|
86
86
|
|
87
87
|
# Use a specific model
|
88
88
|
vector = RubyLLM.embed(
|
data/lib/ruby_llm/chat.rb
CHANGED
@@ -97,8 +97,10 @@ module RubyLLM
|
|
97
97
|
|
98
98
|
def handle_tool_calls(response, &block)
|
99
99
|
response.tool_calls.each_value do |tool_call|
|
100
|
+
@on[:new_message]&.call
|
100
101
|
result = execute_tool tool_call
|
101
|
-
add_tool_result tool_call.id, result
|
102
|
+
message = add_tool_result tool_call.id, result
|
103
|
+
@on[:end_message]&.call(message)
|
102
104
|
end
|
103
105
|
|
104
106
|
complete(&block)
|
data/lib/ruby_llm/version.rb
CHANGED