llm.rb 0.6.0 → 0.6.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: 3452ff48dff867c48be888eb5ae2fff97624b8e51029cd13a26844d67a7824cf
4
- data.tar.gz: 51a65baeff8b026c6ea9fdda2063d14a7961dd902f94cccd34c7591f606a586f
3
+ metadata.gz: a1f511ff8e5ea40a91c14f89d76a746e8ca96a866a7e99e2eb1c409d2cdebf74
4
+ data.tar.gz: 2d6b59d9fec4e9a38995571165b5aae96510f349d0011dd1de7e2c0776370279
5
5
  SHA512:
6
- metadata.gz: a548f97a9019529146f0e6f7414239aaee5b0b6695c924f28f602de7a1ef2f390e1b0053545dab2ee6725f7dabd7a2c83e3b9181027a492630f12dda77870637
7
- data.tar.gz: f71fbd16d3fb22a0ad37d59e93fc7b9e6093fc2b77ebf0e6b7eeca69cb227fd84867ab02c594c4b608ea9017eb6cc40d3fa5c2ff76ffb09fbc1a1b573823a84b
6
+ metadata.gz: fa1bedadae41e2c53fcbb0a8be37e158e5627a7e1f57aff0f34f49829a78386f342fc092222b50ab90e4b2e88603e5a5fd17912a99cccafb78f4cea23ac6b523
7
+ data.tar.gz: 8f78f02800ec4ecd829ebc2ecc459bdc7313bcae7c0d231a312e60a8f1b1c5aad7a912a0b7dafe6816180d7545edd5890d22c496fe53c556a326f93b3f0ce183
@@ -40,6 +40,8 @@ module LLM::Ollama::Format
40
40
  {content:}
41
41
  when LLM::Message
42
42
  format_content(content.content)
43
+ when LLM::Function::Return
44
+ throw(:abort, {role: "tool", tool_call_id: content.id, content: JSON.dump(content.value)})
43
45
  else
44
46
  raise LLM::Error::PromptError, "The given object (an instance of #{content.class}) " \
45
47
  "is not supported by the Ollama API"
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.6.0"
4
+ VERSION = "0.6.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.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antar Azri