(
self,
*,
tools: Optional[List[ChatTemplateTool]] = None,
completion_id: str = "",
choice_index: int = 0,
generation_prompt: str = "",
)
| 8450 | ) |
| 8451 | |
| 8452 | def _response_parser( |
| 8453 | self, |
| 8454 | *, |
| 8455 | tools: Optional[List[ChatTemplateTool]] = None, |
| 8456 | completion_id: str = "", |
| 8457 | choice_index: int = 0, |
| 8458 | generation_prompt: str = "", |
| 8459 | ) -> ResponseParser: |
| 8460 | if self.model.response_schema is None: |
| 8461 | raise CompletionResponseParsingError("model does not define response_schema") |
| 8462 | return ResponseParser( |
| 8463 | self.model.response_schema, |
| 8464 | tools=tools, |
| 8465 | completion_id=completion_id, |
| 8466 | choice_index=choice_index, |
| 8467 | generation_prompt=generation_prompt, |
| 8468 | ) |
| 8469 | |
| 8470 | def parse_chat_response( |
| 8471 | self, |
no test coverage detected