Class: Foobara::Ai::AnswerBot::DomainMappers::OllamaApi::ChatCompletionToAnswer

Inherits:
DomainMapper
  • Object
show all
Defined in:
foobara-ai-1.0.4/src/foobara/ai/answer_bot/domain_mappers/ollama_api/chat_completion_to_answer.rb

Constant Summary

Constants included from TruncatedInspect

TruncatedInspect::MAX_LENGTH

Instance Method Summary collapse

Methods inherited from DomainMapper

applicable?, applicable_score, #execute, foobara_on_register, from, #from, from_type, install!, map, map!, matches?, to, to_type

Methods included from TruncatedInspect

#inspect, truncating

Methods included from Concern

foobara_class_methods_module_for, foobara_concern?, included

Instance Method Details

#mapObject



10
11
12
# File 'src/foobara/ai/answer_bot/domain_mappers/ollama_api/chat_completion_to_answer.rb', line 10

def map
  chat_completion.message.content
end