Module: NitroIntelligence
- Includes:
- ActiveSupport::Deprecation::DeprecatedConstantAccessor
- Defined in:
- lib/nitro_intelligence/langfuse_tracer_provider.rb,
lib/nitro_intelligence.rb,
lib/nitro_intelligence/trace.rb,
lib/nitro_intelligence/version.rb,
lib/nitro_intelligence/reporter.rb,
lib/nitro_intelligence/assistant.rb,
lib/nitro_intelligence/assistants.rb,
lib/nitro_intelligence/null_cache.rb,
lib/nitro_intelligence/client/base.rb,
lib/nitro_intelligence/deprecation.rb,
lib/nitro_intelligence/media/audio.rb,
lib/nitro_intelligence/media/image.rb,
lib/nitro_intelligence/media/media.rb,
lib/nitro_intelligence/agent_server.rb,
lib/nitro_intelligence/models/model.rb,
lib/nitro_intelligence/client/client.rb,
lib/nitro_intelligence/configuration.rb,
lib/nitro_intelligence/client/factory.rb,
lib/nitro_intelligence/client/observed.rb,
lib/nitro_intelligence/assistant_registry.rb,
lib/nitro_intelligence/langfuse_extension.rb,
lib/nitro_intelligence/models/model_catalog.rb,
lib/nitro_intelligence/models/model_factory.rb,
lib/nitro_intelligence/observability/prompt.rb,
lib/nitro_intelligence/observability/project.rb,
lib/nitro_intelligence/media/image_generation.rb,
lib/nitro_intelligence/observability/prompt_store.rb,
lib/nitro_intelligence/tool_call_review_validator.rb,
lib/nitro_intelligence/client/handlers/base_handler.rb,
lib/nitro_intelligence/client/handlers/chat_handler.rb,
lib/nitro_intelligence/observability/project_client.rb,
lib/nitro_intelligence/observability/upload_handler.rb,
lib/nitro_intelligence/client/handlers/image_handler.rb,
lib/nitro_intelligence/observability/prompt_resolver.rb,
lib/nitro_intelligence/client/observers/langfuse_observer.rb,
lib/nitro_intelligence/client/handlers/observed/chat_handler.rb,
lib/nitro_intelligence/observability/project_client_registry.rb,
lib/nitro_intelligence/client/handlers/observed/image_handler.rb,
lib/nitro_intelligence/client/handlers/text_to_speech_handler.rb,
lib/nitro_intelligence/client/handlers/audio_transcription_handler.rb,
lib/nitro_intelligence/client/handlers/observed/text_to_speech_handler.rb,
lib/nitro_intelligence/client/handlers/observed/audio_transcription_handler.rb
Overview
This is an adaptation of https://github.com/simplepractice/langfuse-rb/blob/main/lib/langfuse/otel_setup.rb that lets users create multiple Langfuse clients in the same process. See also components/nitro_intelligence/lib/nitro_intelligence/langfuse_extension.rb
The content of this file should eventually make its way upstream.
Defined Under Namespace
Modules: Client, Observability, Trace Classes: Assistant, AssistantRegistry, Assistants, Audio, Configuration, Image, ImageGeneration, ImageModel, LangfuseExtension, LangfuseTracerProvider, Media, Model, ModelCatalog, ModelFactory, NullCache, Reporter, TextModel, TextToSpeechModel, ToolCallReviewValidator
Constant Summary collapse
- VERSION =
"2.7.0".freeze
Class Method Summary collapse
-
.agent_server ⇒ Object
Deprecated: use
NitroIntelligence.assistants. -
.assistants ⇒ Object
A registry addressable by name when
assistants_configcarriesdefinitions, and the single pre-registry client otherwise. - .cache ⇒ Object
-
.deprecator ⇒ Object
Deprecations introduced while the agent server was renamed to Nitro Intelligence Assistants.
- .model_catalog ⇒ Object
- .project_client_registry ⇒ Object
Class Method Details
.agent_server ⇒ Object
Deprecated: use NitroIntelligence.assistants.
39 40 41 42 |
# File 'lib/nitro_intelligence.rb', line 39 def agent_server deprecator.warn("`NitroIntelligence.agent_server` is deprecated. Use `NitroIntelligence.assistants` instead.") assistants end |
.assistants ⇒ Object
A registry addressable by name when assistants_config carries definitions, and the
single pre-registry client otherwise. The two shapes are mutually exclusive, so the
configuration decides which one a host gets: one that has not reshaped its config keeps
the client it already had.
31 32 33 34 35 36 |
# File 'lib/nitro_intelligence.rb', line 31 def assistants current = assistants_config.to_h.deep_stringify_keys return AssistantRegistry.new(current) if current.key?(AssistantRegistry::DEFINITIONS_KEY) Assistants.new(**current.symbolize_keys) end |
.cache ⇒ Object
44 45 46 |
# File 'lib/nitro_intelligence.rb', line 44 def cache configuration.cache_provider end |
.deprecator ⇒ Object
Deprecations introduced while the agent server was renamed to Nitro Intelligence Assistants. The names they cover are removed in 3.0.
7 8 9 |
# File 'lib/nitro_intelligence/deprecation.rb', line 7 def deprecator @deprecator ||= ActiveSupport::Deprecation.new("3.0", "Nitro Intelligence") end |
.model_catalog ⇒ Object
48 49 50 |
# File 'lib/nitro_intelligence.rb', line 48 def model_catalog @model_catalog ||= ModelCatalog.new(configuration.model_config) end |
.project_client_registry ⇒ Object
52 53 54 55 56 |
# File 'lib/nitro_intelligence.rb', line 52 def project_client_registry @project_client_registry ||= Observability::ProjectClientRegistry.new( base_url: configuration.observability_base_url ) end |