helicone-rb 0.1.1 → 0.1.2

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: e88e12d27963faaf420d13dc78cda2eada0f86fd97fb22570c310ac91610bf03
4
- data.tar.gz: fa8f16816537172ec4ef2c859791e63e816860fe23a5e72bc78b361177587d9a
3
+ metadata.gz: 22d855f83be3572fa91710cb1a63483ac70e07717b9a77103ca752d71931ad09
4
+ data.tar.gz: 26a6eca90b9d1c9ff1cee79ae8a774da5a65fec8088c30bae1956c493242e336
5
5
  SHA512:
6
- metadata.gz: 5a3b285e947a350c25e2b7d68b5c415b38ed1415eaaa366078ed356405e19989f1fc4674e4709113dfc09a3b089534edbb03fbebdfa169d5f0b1d13ec28612fb
7
- data.tar.gz: b8feec47c41a127a1108328c729ee11398d83c360b8498aacb71781c9a035aba6cba874851647cfc706dd93a08961593ce1f889cabc087c472850f8e427a3b5b
6
+ metadata.gz: de7718c83e259ded888212a02c63f2cac6f02eb457ded45361efa1d903a2490a0774425dccab4861da8dd40d48888ab3a156ab769dac1c8f64d42e59b427aa41
7
+ data.tar.gz: 60bc8baed47ae2599f8a7f7f5ecfeca1e791b9b1ddf1123a61e99d7e2f1368254dfeef3a29d0d3941f27c1b1215fe1ac28220ce5ec74c292e610ea9c132d6763
data/README.md CHANGED
@@ -112,7 +112,7 @@ response = client.ask("What is the capital of France?")
112
112
  # With system prompt
113
113
  response = client.ask(
114
114
  "Explain quantum computing",
115
- system: "You are a physics teacher. Explain concepts simply."
115
+ system_prompt: "You are a physics teacher. Explain concepts simply."
116
116
  )
117
117
  ```
118
118
 
@@ -66,12 +66,12 @@ module Helicone
66
66
  #
67
67
  # @param prompt [String] User prompt text
68
68
  # @param model [String] Model ID to use for completion
69
- # @param system [String] Optional system prompt
69
+ # @param system_prompt [String] Optional system prompt
70
70
  # @param options [Hash] Additional options passed to chat
71
71
  # @return [String] The text content of the response
72
- def ask(prompt, model: nil, system: nil, **options)
72
+ def ask(prompt, model: nil, system_prompt: nil, **options)
73
73
  messages = []
74
- messages << Message.system(system) if system
74
+ messages << Message.system(system_prompt) if system_prompt
75
75
  messages << Message.user_text(prompt)
76
76
 
77
77
  response = chat(messages: messages, model: model, **options)
@@ -83,13 +83,13 @@ module Helicone
83
83
  # @param prompt [String] User prompt text
84
84
  # @param image_url [String] URL or base64 data URI of the image
85
85
  # @param model [String] Model ID to use for completion
86
- # @param system [String] Optional system prompt
86
+ # @param system_prompt [String] Optional system prompt
87
87
  # @param detail [String] Image detail level: "auto", "low", or "high"
88
88
  # @param options [Hash] Additional options passed to chat
89
89
  # @return [String] The text content of the response
90
- def ask_with_image(prompt, image_url, model: nil, system: nil, detail: "auto", **options)
90
+ def ask_with_image(prompt, image_url, model: nil, system_prompt: nil, detail: "auto", **options)
91
91
  messages = []
92
- messages << Message.system(system) if system
92
+ messages << Message.system(system_prompt) if system_prompt
93
93
  messages << Message.user_with_images(prompt, image_url, detail: detail)
94
94
 
95
95
  response = chat(messages: messages, model: model, **options)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Helicone
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
data/sample.rb CHANGED
@@ -23,7 +23,7 @@ client.ask("What is 2 + 2?")
23
23
  # => "2 + 2 equals 4."
24
24
 
25
25
  # With a system prompt
26
- client.ask("Tell me a joke", system: "You are a comedian")
26
+ client.ask("Tell me a joke", system_prompt: "You are a comedian")
27
27
 
28
28
  # With a specific model
29
29
  client.ask("Explain Ruby blocks", model: "gpt-4o-mini")
@@ -115,7 +115,7 @@ end
115
115
  # Run the agent
116
116
  agent = Helicone::Agent.new(
117
117
  tools: [WeatherTool, CalculatorTool],
118
- system: "You are a helpful assistant with access to weather and calculator tools."
118
+ system_prompt: "You are a helpful assistant with access to weather and calculator tools."
119
119
  )
120
120
 
121
121
  result = agent.run("What's the weather in San Francisco?")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helicone-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genevere