Class: ActiveAgent::Providers::MockProvider
- Inherits:
-
BaseProvider
- Object
- BaseProvider
- ActiveAgent::Providers::MockProvider
- Defined in:
- lib/active_agent/providers/mock_provider.rb
Overview
Mock provider for testing purposes.
This provider doesn’t make real API calls. Instead, it returns the last message content converted to pig latin for prompts, and random data for embeddings. Useful for testing without incurring API costs or requiring network access.
Class Method Summary collapse
-
.embed_request_type ⇒ ActiveModel::Type::Value
Returns the embedding request type for Mock.
Instance Method Summary collapse
-
#client ⇒ MockProvider
Returns a mock client (just returns self since we don’t need a real client).
Methods inherited from BaseProvider
#embed, #initialize, namespace, options_klass, #preview, #prompt, prompt_request_type, service_name, tag_name
Methods included from ToolChoiceClearing
Methods included from Previewable
Methods included from Instrumentation
#instrumentation_prompt_payload
Methods included from ExceptionHandler
#configure_exception_handler, #rescue_with_handler, #with_exception_handling
Constructor Details
This class inherits a constructor from ActiveAgent::Providers::BaseProvider
Class Method Details
.embed_request_type ⇒ ActiveModel::Type::Value
Returns the embedding request type for Mock.
23 24 25 |
# File 'lib/active_agent/providers/mock_provider.rb', line 23 def self. Mock::EmbeddingRequestType.new end |
Instance Method Details
#client ⇒ MockProvider
Returns a mock client (just returns self since we don’t need a real client).
30 31 32 |
# File 'lib/active_agent/providers/mock_provider.rb', line 30 def client self end |