Method
completion_finish_chunk
(
self,
request: CompletionRequest,
completion: Completion,
finish_reason: str,
)
Source from the content-addressed store, hash-verified
| 10165 | return chunks |
| 10166 | |
| 10167 | def completion_finish_chunk( |
| 10168 | self, |
| 10169 | request: CompletionRequest, |
| 10170 | completion: Completion, |
| 10171 | finish_reason: str, |
| 10172 | ) -> CompletionChunk: |
| 10173 | return { |
| 10174 | "id": request.id, |
| 10175 | "object": "text_completion", |
| 10176 | "created": request.created, |
| 10177 | "model": self.model.model_path, |
| 10178 | "choices": [ |
| 10179 | { |
| 10180 | "text": "", |
| 10181 | "index": completion.index, |
| 10182 | "logprobs": None, |
| 10183 | "finish_reason": finish_reason, |
| 10184 | } |
| 10185 | ], |
| 10186 | } |
| 10187 | |
| 10188 | def _build_completion_choice( |
| 10189 | self, |
Tested by
no test coverage detected