mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 07:14:20 +00:00
addressing comments
This commit is contained in:
parent
0e985648f5
commit
fd8adc1e50
3 changed files with 9 additions and 2 deletions
|
@ -13,7 +13,7 @@ async def get_inference_api_instance(config: InferenceConfig):
|
|||
|
||||
return InferenceImpl(config.impl_config)
|
||||
elif config.impl_config.impl_type == ImplType.ollama.value:
|
||||
from .inference import OllamaInference
|
||||
from .ollama import OllamaInference
|
||||
|
||||
return OllamaInference(config.impl_config)
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ hydra-zen
|
|||
json-strong-typing
|
||||
llama-models
|
||||
matplotlib
|
||||
ollama
|
||||
omegaconf
|
||||
pandas
|
||||
Pillow
|
||||
|
|
|
@ -9,6 +9,9 @@ from llama_models.llama3_1.api.datatypes import (
|
|||
StopReason,
|
||||
SystemMessage,
|
||||
)
|
||||
from llama_toolchain.inference.api_instance import (
|
||||
get_inference_api_instance,
|
||||
)
|
||||
from llama_toolchain.inference.api.datatypes import (
|
||||
ChatCompletionResponseEventType,
|
||||
)
|
||||
|
@ -16,6 +19,7 @@ from llama_toolchain.inference.api.endpoints import (
|
|||
ChatCompletionRequest
|
||||
)
|
||||
from llama_toolchain.inference.api.config import (
|
||||
InferenceConfig,
|
||||
OllamaImplConfig
|
||||
)
|
||||
from llama_toolchain.inference.ollama import (
|
||||
|
@ -32,7 +36,9 @@ class OllamaInferenceTests(unittest.IsolatedAsyncioTestCase):
|
|||
)
|
||||
|
||||
# setup ollama
|
||||
self.api = OllamaInference(ollama_config)
|
||||
self.api = await get_inference_api_instance(
|
||||
InferenceConfig(impl_config=ollama_config)
|
||||
)
|
||||
await self.api.initialize()
|
||||
|
||||
current_date = datetime.now()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue