|
3 | 3 | #
|
4 | 4 | # This source code is licensed under the terms described in the LICENSE file in
|
5 | 5 | # the root directory of this source tree.
|
| 6 | +from typing import Any |
| 7 | + |
| 8 | +from llama_stack.apis.inference.inference import OpenAICompletion |
6 | 9 | from llama_stack.log import get_logger
|
7 | 10 | from llama_stack.providers.remote.inference.llama_openai_compat.config import LlamaCompatConfig
|
8 | 11 | from llama_stack.providers.utils.inference.litellm_openai_mixin import LiteLLMOpenAIMixin
|
@@ -51,3 +54,28 @@ async def initialize(self):
|
51 | 54 |
|
52 | 55 | async def shutdown(self):
|
53 | 56 | await super().shutdown()
|
| 57 | + |
| 58 | + async def openai_completion( |
| 59 | + self, |
| 60 | + model: str, |
| 61 | + prompt: str | list[str] | list[int] | list[list[int]], |
| 62 | + best_of: int | None = None, |
| 63 | + echo: bool | None = None, |
| 64 | + frequency_penalty: float | None = None, |
| 65 | + logit_bias: dict[str, float] | None = None, |
| 66 | + logprobs: bool | None = None, |
| 67 | + max_tokens: int | None = None, |
| 68 | + n: int | None = None, |
| 69 | + presence_penalty: float | None = None, |
| 70 | + seed: int | None = None, |
| 71 | + stop: str | list[str] | None = None, |
| 72 | + stream: bool | None = None, |
| 73 | + stream_options: dict[str, Any] | None = None, |
| 74 | + temperature: float | None = None, |
| 75 | + top_p: float | None = None, |
| 76 | + user: str | None = None, |
| 77 | + guided_choice: list[str] | None = None, |
| 78 | + prompt_logprobs: int | None = None, |
| 79 | + suffix: str | None = None, |
| 80 | + ) -> OpenAICompletion: |
| 81 | + raise NotImplementedError() |
0 commit comments