Class: Intelligence::Groq::Adapter
- Inherits:
-
Legacy::Adapter
- Object
- Adapter::Base
- Intelligence::Generic::Adapter
- Legacy::Adapter
- Intelligence::Groq::Adapter
- Defined in:
- lib/intelligence/adapters/groq.rb
Instance Method Summary collapse
- #chat_request_generic_message_attributes ⇒ Object
-
#chat_request_message_attributes(message) ⇒ Object
groq models only support the legacy Open AI message schema for the assistant messages while supporting the modern message schema for user messages.
Methods included from Legacy::ChatMethods
#chat_request_body, #chat_request_legacy_message_attributes
Methods included from Intelligence::Generic::ChatMethods
#chat_request_body, #chat_request_headers, #chat_request_uri, #chat_result_attributes, #chat_result_error_attributes, included, #stream_result_attributes, #stream_result_chunk_attributes, #translate_end_result, #translate_error_response_status
Instance Method Details
#chat_request_generic_message_attributes ⇒ Object
48 |
# File 'lib/intelligence/adapters/groq.rb', line 48 alias |
#chat_request_message_attributes(message) ⇒ Object
groq models only support the legacy Open AI message schema for the assistant messages while supporting the modern message schema for user messages
52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/intelligence/adapters/groq.rb', line 52 def ( ) role = [ :role ]&.to_sym case role when :user ( ) when :assistant ( ) else raise UnsupportedContentError.new( :mistral, 'only supports user and assistant message roles' ) end end |