diff --git a/src/Cellm/Models/Llamafile/LlamafileRequestHandler.cs b/src/Cellm/Models/Llamafile/LlamafileRequestHandler.cs index 8a6f5d7..f52aecc 100644 --- a/src/Cellm/Models/Llamafile/LlamafileRequestHandler.cs +++ b/src/Cellm/Models/Llamafile/LlamafileRequestHandler.cs @@ -57,8 +57,8 @@ public LlamafileRequestHandler(IOptions cellmConfiguration, public async Task Handle(LlamafileRequest request, CancellationToken cancellationToken) { - // Download model and start Llamafile on first call - var llamafile = await _llamafiles[request.Prompt.Model ?? _llamafileConfiguration.DefaultModel]; + // Start server on first call + var llamafile = await _llamafiles[request.Prompt.Options.ModelId ?? _llamafileConfiguration.DefaultModel]; var openAiResponse = await _sender.Send(new OpenAiRequest(request.Prompt, nameof(Llamafile), llamafile.BaseAddress), cancellationToken);