Class: GenAI::Language::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/gen_ai/language/base.rb

Direct Known Subclasses

Anthropic, Gemini, GooglePalm, OpenAI

Constant Summary collapse

DEFAULT_ROLE =
'user'

Instance Method Summary collapse

Methods included from Dependency

#depends_on

Instance Method Details

#chatObject

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/gen_ai/language/base.rb', line 16

def chat(...)
  raise NotImplementedError, "#{self.class.name} does not support conversations"
end

#completeObject

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/gen_ai/language/base.rb', line 12

def complete(...)
  raise NotImplementedError, "#{self.class.name} does not support completion"
end

#embedObject

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/gen_ai/language/base.rb', line 8

def embed(...)
  raise NotImplementedError, "#{self.class.name} does not support embedding"
end