update inference config to take model and not model_dir

This commit is contained in:
Hardik Shah 2024-08-06 15:02:41 -07:00
parent 08c3802f45
commit 039861f1c7
9 changed files with 400 additions and 101 deletions

View file

@ -44,11 +44,13 @@ OLLAMA_SUPPORTED_SKUS = {
}
def get_provider_impl(config: OllamaImplConfig) -> Inference:
async def get_provider_impl(config: OllamaImplConfig) -> Inference:
assert isinstance(
config, OllamaImplConfig
), f"Unexpected config type: {type(config)}"
return OllamaInference(config)
impl = OllamaInference(config)
await impl.initialize()
return impl
class OllamaInference(Inference):