langfuse-rb 0.9.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: 1eedf02269727792fdb13a343429d2108556cc4c7df52dea9e2c638a011409a0
4
- data.tar.gz: 0130f17065fa3e4233090e858a2699105d9be48dce85d6765b0c3ee394c88bff
3
+ metadata.gz: 06f62784113cec51196e77ba4604d8a056b0cd2fbeaccc950af44311cf428ae2
4
+ data.tar.gz: 96c3b104d313ed20a17ce199b7999cd91d4cf5a9f34482e7ef4d1a8508a00f0e
5
5
  SHA512:
6
- metadata.gz: 036b34ce7908114bdad51bf895c5f50159f005bbf53f3256a347dc7a6c813d9c49d18c9f7491dc42c8771d66fb6b509ae1441af6812d575ff45b80fe4e73ce6e
7
- data.tar.gz: c4cf129fd0260c35f91e75797903d29e16d74b0bf543a89d9f566201a69e08eaf6245fc9d117e5f2f0e3bad5673cfee5cd54e0802d46a53809ab9c5ea825f172
6
+ metadata.gz: a5516b70bf74c36dd05c9766b5105d7ba9d249743b3b77f7136f73c7f4a2fe554cad109424ef4afc381f71cf5353d28248a97cce2e526c3cd8918a9a877250b8
7
+ data.tar.gz: 5eb592bf72abb6634413d7bb5de38cf188dac7cfae59cebbc7ee3810c875cdb4e2bbd037fca73165fa2e4b72ac966bf302b0629feabebd80adf128a04e7af7c7
data/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.10.1] - 2026-05-05
11
+
12
+ ### Changed
13
+ - Refactor prompt cache internals (#91)
14
+
15
+ ## [0.10.0] - 2026-05-05
16
+
17
+ ### Added
18
+ - Expose prompt cache operations on the client (#89)
19
+
20
+ ### Changed
21
+ - Tighten cache event dispatch and generation safety for prompt caching (#90)
22
+
23
+ ### Documentation
24
+ - Align README with sibling Langfuse SDKs (#88)
25
+
10
26
  ## [0.9.0] - 2026-04-28
11
27
 
12
28
  ### Added
@@ -113,7 +129,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
113
129
  - Migrated from legacy ingestion API to OTLP endpoint
114
130
  - Removed `tracing_enabled` configuration flag (#2)
115
131
 
116
- [Unreleased]: https://github.com/simplepractice/langfuse-rb/compare/v0.9.0...HEAD
132
+ [Unreleased]: https://github.com/simplepractice/langfuse-rb/compare/v0.10.1...HEAD
133
+ [0.10.1]: https://github.com/simplepractice/langfuse-rb/compare/v0.10.0...v0.10.1
134
+ [0.10.0]: https://github.com/simplepractice/langfuse-rb/compare/v0.9.0...v0.10.0
117
135
  [0.9.0]: https://github.com/simplepractice/langfuse-rb/compare/v0.8.0...v0.9.0
118
136
  [0.8.0]: https://github.com/simplepractice/langfuse-rb/compare/v0.7.0...v0.8.0
119
137
  [0.7.0]: https://github.com/simplepractice/langfuse-rb/compare/v0.6.0...v0.7.0
data/README.md CHANGED
@@ -1,77 +1,20 @@
1
1
  <img width="2255" height="527" alt="langfuse-wordart" src="https://github.com/user-attachments/assets/59422d0a-6ecb-4e5f-a21c-cae955b5ce75" />
2
2
 
3
-
4
3
  # Langfuse Ruby SDK
5
4
 
6
- [![Gem Version](https://badge.fury.io/rb/langfuse-rb.svg?icon=si%3Arubygems)](https://badge.fury.io/rb/langfuse-rb)
7
- [![Ruby](https://img.shields.io/badge/ruby-%3E%3D%203.2.0-ruby.svg)](https://www.ruby-lang.org/en/)
8
- [![Test Coverage](https://img.shields.io/badge/coverage-99.6%25-brightgreen.svg)](coverage)
9
-
10
- > Ruby SDK for [Langfuse](https://langfuse.com) - Open-source LLM observability and prompt management.
5
+ [![MIT License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](https://opensource.org/licenses/MIT)
6
+ [![CI test status](https://img.shields.io/github/actions/workflow/status/simplepractice/langfuse-rb/ci.yml?style=flat-square&label=All%20tests)](https://github.com/simplepractice/langfuse-rb/actions/workflows/ci.yml?query=branch%3Amain)
7
+ [![Gem Version](https://img.shields.io/gem/v/langfuse-rb.svg?style=flat-square&label=gem+langfuse-rb)](https://rubygems.org/gems/langfuse-rb)
11
8
 
12
9
  ## Installation
13
10
 
14
- ```ruby
15
- gem "langfuse-rb"
16
- ```
17
-
18
- ## Quick Start
11
+ > [!IMPORTANT]
12
+ > The SDK requires Ruby `>= 3.2.0`.
19
13
 
20
14
  ```ruby
21
- Langfuse.configure do |config|
22
- config.public_key = ENV["LANGFUSE_PUBLIC_KEY"]
23
- config.secret_key = ENV["LANGFUSE_SECRET_KEY"]
24
- config.base_url = ENV.fetch("LANGFUSE_BASE_URL", "https://cloud.langfuse.com")
25
-
26
- # Optional: sample traces and trace-linked scores deterministically
27
- config.sample_rate = 1.0
28
- end
29
-
30
- message = Langfuse.client.compile_prompt(
31
- "greeting",
32
- variables: { name: "Alice" }
33
- )
34
- ```
35
-
36
- Langfuse tracing is isolated by default. `Langfuse.configure` stores configuration only; it does not replace `OpenTelemetry.tracer_provider`.
37
-
38
- `sample_rate` is applied to traces and trace-linked scores. Rebuild the client with `Langfuse.reset!` before expecting runtime sampling changes to take effect.
39
-
40
- ## Trace an LLM Call
41
-
42
- ```ruby
43
- Langfuse.observe("chat-completion", as_type: :generation) do |gen|
44
- gen.model = "gpt-4.1-mini"
45
- gen.input = [{ role: "user", content: "Hello!" }]
46
-
47
- response = openai_client.chat(
48
- parameters: {
49
- model: "gpt-4.1-mini",
50
- messages: [{ role: "user", content: "Hello!" }]
51
- }
52
- )
53
-
54
- gen.update(
55
- output: response.dig("choices", 0, "message", "content"),
56
- usage_details: {
57
- prompt_tokens: response.dig("usage", "prompt_tokens"),
58
- completion_tokens: response.dig("usage", "completion_tokens")
59
- }
60
- )
61
- end
15
+ gem "langfuse-rb"
62
16
  ```
63
17
 
64
- ## Start Here
65
-
66
- - [Documentation Hub](docs/README.md)
67
- - [Getting Started](docs/GETTING_STARTED.md)
68
- - [Prompts](docs/PROMPTS.md)
69
- - [Tracing](docs/TRACING.md)
70
- - [Scoring](docs/SCORING.md)
71
- - [Rails Patterns](docs/RAILS.md)
72
- - [Agent Skills](https://github.com/langfuse/skills)
73
- - [Agent Skill Docs](https://langfuse.com/docs/api-and-data-platform/features/agent-skill)
74
-
75
- ## License
18
+ ## Docs
76
19
 
77
- [MIT](LICENSE)
20
+ Please [see our docs](docs/README.md) for detailed information on this SDK.