llm.rb 0.10.0 → 0.10.1
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 +4 -9
- data/lib/llm/function.rb +12 -8
- data/lib/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: 39e538d8185cf5c8c5a36da0e1bf5b0b9e0055945a02570cd00fefc805b288d0
|
4
|
+
data.tar.gz: 7fc0d3a4422fe10bb3058c7b1b5b9bc80693ccc0dbf6b62bda46d42fb7c2830c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2b3de69ce317d856ec593074e22883ec2b96ddcdc2637cb2b4c555885c1c771b2ffd447b255cdc16a2c7f1c2b72362ab1b6e29ec0fdf775e977292b03fd3e34
|
7
|
+
data.tar.gz: c2ba0f853b7eaac4ca8fab15f497a3fa375e054b7da928b2f0798e393909baff20d2381afd48e793fd878261a0d838474e4be3be5b5232e480cf162af57dbe2e
|
data/README.md
CHANGED
@@ -37,18 +37,13 @@ images, files, and JSON Schema generation.
|
|
37
37
|
> is capable of.
|
38
38
|
|
39
39
|
<details>
|
40
|
-
<summary><b>1.
|
41
|
-
<img src="https://github.com/llmrb/llm/raw/main/share/llm-shell/examples/
|
40
|
+
<summary><b>1. An introduction to tool calls</b></summary>
|
41
|
+
<img src="https://github.com/llmrb/llm/raw/main/share/llm-shell/examples/toolcalls_v2.gif">
|
42
42
|
</details>
|
43
43
|
|
44
44
|
<details>
|
45
|
-
<summary><b>2.
|
46
|
-
<img src="https://github.com/llmrb/llm/raw/main/share/llm-shell/examples/files-
|
47
|
-
</details>
|
48
|
-
|
49
|
-
<details>
|
50
|
-
<summary><b>3. Files: import at boot time</b></summary>
|
51
|
-
<img src="https://github.com/llmrb/llm/raw/main/share/llm-shell/examples/files-boottime.gif">
|
45
|
+
<summary><b>2. Add files as conversation context</b></summary>
|
46
|
+
<img src="https://github.com/llmrb/llm/raw/main/share/llm-shell/examples/files-runtime_v2.gif">
|
52
47
|
</details>
|
53
48
|
|
54
49
|
## Examples
|
data/lib/llm/function.rb
CHANGED
@@ -33,6 +33,11 @@ class LLM::Function
|
|
33
33
|
class Return < Struct.new(:id, :value)
|
34
34
|
end
|
35
35
|
|
36
|
+
##
|
37
|
+
# Returns the function ID
|
38
|
+
# @return [String, nil]
|
39
|
+
attr_accessor :id
|
40
|
+
|
36
41
|
##
|
37
42
|
# Returns the function name
|
38
43
|
# @return [String]
|
@@ -43,11 +48,6 @@ class LLM::Function
|
|
43
48
|
# @return [Array, nil]
|
44
49
|
attr_accessor :arguments
|
45
50
|
|
46
|
-
##
|
47
|
-
# Returns the function ID
|
48
|
-
# @return [String, nil]
|
49
|
-
attr_accessor :id
|
50
|
-
|
51
51
|
##
|
52
52
|
# @param [String] name The function name
|
53
53
|
# @yieldparam [LLM::Function] self The function object
|
@@ -61,10 +61,14 @@ class LLM::Function
|
|
61
61
|
|
62
62
|
##
|
63
63
|
# Set the function description
|
64
|
-
# @param [String]
|
64
|
+
# @param [String] desc The function description
|
65
65
|
# @return [void]
|
66
|
-
def description(
|
67
|
-
|
66
|
+
def description(desc = nil)
|
67
|
+
if desc
|
68
|
+
@description = desc
|
69
|
+
else
|
70
|
+
@description
|
71
|
+
end
|
68
72
|
end
|
69
73
|
|
70
74
|
##
|
data/lib/llm/version.rb
CHANGED