diff options
| author | Adam Malczewski <[email protected]> | 2026-03-31 20:22:45 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-03-31 20:22:45 +0900 |
| commit | 3e32dec579fbdedec8c7ddb881207b25bb342e60 (patch) | |
| tree | 9db02b8f744fa2c1203b78e6c84a62f770bc1e73 /lib/dispatch/adapter/base.rb | |
| parent | a1eed75083df6afd4895a4438309319d2a9e5523 (diff) | |
| download | dispatch-adapter-copilot-3e32dec579fbdedec8c7ddb881207b25bb342e60.tar.gz dispatch-adapter-copilot-3e32dec579fbdedec8c7ddb881207b25bb342e60.zip | |
imp
Diffstat (limited to 'lib/dispatch/adapter/base.rb')
| -rw-r--r-- | lib/dispatch/adapter/base.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/dispatch/adapter/base.rb b/lib/dispatch/adapter/base.rb new file mode 100644 index 0000000..dbd136a --- /dev/null +++ b/lib/dispatch/adapter/base.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true + +module Dispatch + module Adapter + class Base + def chat(_messages, system: nil, tools: [], stream: false, max_tokens: nil, thinking: nil, &_block) + raise NotImplementedError, "#{self.class}#chat must be implemented" + end + + def model_name + raise NotImplementedError, "#{self.class}#model_name must be implemented" + end + + def count_tokens(_messages, system: nil, tools: []) + -1 + end + + def list_models + raise NotImplementedError, "#{self.class}#list_models must be implemented" + end + + def provider_name + self.class.name + end + + def max_context_tokens + nil + end + end + end +end |
