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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15ddbff68b600d6a8926e872ed687edaff585ed075136415c8b8921438c5d32f
4
- data.tar.gz: bf498f154df07de201f1529253559db03e850182afdf84eb6b99efb527920a2f
3
+ metadata.gz: 39e538d8185cf5c8c5a36da0e1bf5b0b9e0055945a02570cd00fefc805b288d0
4
+ data.tar.gz: 7fc0d3a4422fe10bb3058c7b1b5b9bc80693ccc0dbf6b62bda46d42fb7c2830c
5
5
  SHA512:
6
- metadata.gz: 6256cf08682c5f9bf5aff9a6065aec57e23e8f68bc54acd302eee4f6c08628feddf438043e58898611be6ffa0d61c07f437da3c6cd16007d256c6fd4adee4218
7
- data.tar.gz: a7c0510691a9aa08447dc65146a763a37ca1aefb59de9ee10c2eca691d725a971d9dcdc35dc1316ff473b3ff002ef1b5c2963601a8044ec70b2c2302132e4627
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. Tools: "system" function</b></summary>
41
- <img src="https://github.com/llmrb/llm/raw/main/share/llm-shell/examples/toolcalls.gif">
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. Files: import at runtime</b></summary>
46
- <img src="https://github.com/llmrb/llm/raw/main/share/llm-shell/examples/files-runtime.gif">
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] str The function description
64
+ # @param [String] desc The function description
65
65
  # @return [void]
66
- def description(str)
67
- @description = str
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LLM
4
- VERSION = "0.10.0"
4
+ VERSION = "0.10.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llm.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antar Azri