Sha256: 8cf0a701e6d538a6ebea850fe74dc854f415ed36637bb7b63343f0e42414fde4
Contents?: true
Size: 811 Bytes
Versions: 1
Compression:
Stored size: 811 Bytes
Contents
module GenAI class Language def initialize(provider, token, options: {}) @provider = provider @token = token end def answer(question, context: {}) return 'Yes, it is.' end def completion(prompt, options: {}) end def conversation(prompt, options: {}) end def embedding(text) end def sentiment(text) end def keywords(text) end def summarization(text) end def translation(text, target:) end def correction(text) end def llm case @provider when :openai GenAI::Language::OpenAI.new(token: @token) when :google_palm GenAI::Language::GooglePalm.new(token: @token) else raise UnsupportedConfiguration.new "Unknown LLM provider" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gen-ai-0.0.1 | lib/language.rb |