Set supports_developer_role = False for more OpenAI-compatible services
DeepSeek, Mistral, OLLama, Qwen, SambaNova, and Together don't support the "developer" message role.
This commit is contained in:
@@ -30,6 +30,10 @@ class DeepSeekLLMService(OpenAILLMService):
|
||||
maintaining full compatibility with OpenAI's interface and functionality.
|
||||
"""
|
||||
|
||||
# DeepSeek doesn't support the "developer" message role.
|
||||
# This value is used by BaseOpenAILLMService when calling the adapter.
|
||||
supports_developer_role = False
|
||||
|
||||
Settings = DeepSeekLLMSettings
|
||||
_settings: Settings
|
||||
|
||||
|
||||
@@ -32,6 +32,10 @@ class MistralLLMService(OpenAILLMService):
|
||||
maintaining full compatibility with OpenAI's interface and functionality.
|
||||
"""
|
||||
|
||||
# Mistral doesn't support the "developer" message role.
|
||||
# This value is used by BaseOpenAILLMService when calling the adapter.
|
||||
supports_developer_role = False
|
||||
|
||||
Settings = MistralLLMSettings
|
||||
_settings: Settings
|
||||
|
||||
|
||||
@@ -29,6 +29,11 @@ class OLLamaLLMService(OpenAILLMService):
|
||||
providing a compatible interface for running large language models locally.
|
||||
"""
|
||||
|
||||
# OLLama doesn't support the "developer" message role (it seems to quietly
|
||||
# ignore "developer" messages).
|
||||
# This value is used by BaseOpenAILLMService when calling the adapter.
|
||||
supports_developer_role = False
|
||||
|
||||
Settings = OllamaLLMSettings
|
||||
_settings: Settings
|
||||
|
||||
|
||||
@@ -29,6 +29,10 @@ class QwenLLMService(OpenAILLMService):
|
||||
maintaining full compatibility with OpenAI's interface and functionality.
|
||||
"""
|
||||
|
||||
# Qwen doesn't support the "developer" message role.
|
||||
# This value is used by BaseOpenAILLMService when calling the adapter.
|
||||
supports_developer_role = False
|
||||
|
||||
Settings = QwenLLMSettings
|
||||
_settings: Settings
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@ class SambaNovaLLMService(OpenAILLMService): # type: ignore
|
||||
maintaining full compatibility with OpenAI's interface and functionality.
|
||||
"""
|
||||
|
||||
# SambaNova doesn't support the "developer" message role.
|
||||
# This value is used by BaseOpenAILLMService when calling the adapter.
|
||||
supports_developer_role = False
|
||||
|
||||
Settings = SambaNovaLLMSettings
|
||||
_settings: Settings
|
||||
|
||||
|
||||
@@ -29,6 +29,11 @@ class TogetherLLMService(OpenAILLMService):
|
||||
maintaining full compatibility with OpenAI's interface and functionality.
|
||||
"""
|
||||
|
||||
# Together.ai doesn't support the "developer" message role (it seems to quietly
|
||||
# ignore "developer" messages).
|
||||
# This value is used by BaseOpenAILLMService when calling the adapter.
|
||||
supports_developer_role = False
|
||||
|
||||
Settings = TogetherLLMSettings
|
||||
_settings: Settings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user