Class: Intelligence::TogetherAi::Adapter

Inherits:
Legacy::Adapter show all
Defined in:
lib/intelligence/adapters/together_ai.rb

Instance Method Summary collapse

Methods included from Legacy::ChatMethods

#chat_request_body, #chat_request_legacy_message_attributes

Methods included from Generic::ChatMethods

#chat_request_body, #chat_request_headers, #chat_request_message_attributes, #chat_request_uri, #chat_result_attributes, #chat_result_error_attributes, included, #stream_result_attributes, #stream_result_chunk_attributes, #translate_error_response_status

Instance Method Details

#translate_end_result(end_result) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/intelligence/adapters/together_ai.rb', line 28

def translate_end_result( end_result )
  case end_result
    when 'eos'
      :ended
    when 'length'
      :token_limit_exceeded
    when 'stop'
      :end_sequence_encountered
    when 'function_call'
      :tool_called
    else
      nil
  end
end