added changelog
This commit is contained in:
1
changelog/4248.added.md
Normal file
1
changelog/4248.added.md
Normal file
@@ -0,0 +1 @@
|
||||
- Added `AdapterType.OPENAI` to `ToolsSchema`, enabling custom OpenAI-specific tools (e.g. `tool_search`) in Chat Completions,Responses, and Realtime adapters.
|
||||
@@ -22,7 +22,7 @@ class AdapterType(Enum):
|
||||
|
||||
Parameters:
|
||||
GEMINI: Google Gemini adapter.
|
||||
OPENAI: OpenAI adapter (Chat Completions and Responses API).
|
||||
OPENAI: OpenAI adapter (Chat Completions, Responses, and Realtime API).
|
||||
"""
|
||||
|
||||
GEMINI = "gemini"
|
||||
|
||||
@@ -299,10 +299,10 @@ class TestFunctionAdapters(unittest.TestCase):
|
||||
|
||||
def test_openai_adapter_ignores_other_adapter_custom_tools(self):
|
||||
"""Test that OpenAI adapter ignores custom tools for other adapters."""
|
||||
expected = OpenAILLMAdapter().to_provider_tools_format(self.tools_def)
|
||||
tools_def = self.tools_def
|
||||
tools_def.custom_tools = {AdapterType.GEMINI: [{"google_search": {}}]}
|
||||
result = OpenAILLMAdapter().to_provider_tools_format(tools_def)
|
||||
assert len(result) == 1
|
||||
assert OpenAILLMAdapter().to_provider_tools_format(tools_def) == expected
|
||||
|
||||
def test_bedrock_adapter(self):
|
||||
"""Test AWS Bedrock adapter format transformation."""
|
||||
|
||||
Reference in New Issue
Block a user