Convert Tool objects to OpenAI API format.
(self, tools: list[Tool])
| 206 | return result |
| 207 | |
| 208 | def _convert_tools(self, tools: list[Tool]) -> list[dict]: |
| 209 | """Convert Tool objects to OpenAI API format.""" |
| 210 | return [ |
| 211 | { |
| 212 | 'type': 'function', |
| 213 | 'function': { |
| 214 | 'name': tool.name, |
| 215 | 'description': tool.description, |
| 216 | 'parameters': tool.parameters |
| 217 | } |
| 218 | } |
| 219 | for tool in tools |
| 220 | ] |
| 221 | |
| 222 | def _make_request(self, payload: dict) -> dict: |
| 223 | """Make an HTTP request to the Docker Model Runner API.""" |
no outgoing calls
no test coverage detected