Switch to 'ai-models' for the local dir

Signed-off-by: Ryan Levick <ryan.levick@fermyon.com>
This commit is contained in:
Ryan Levick 2023-09-01 17:40:44 +02:00
parent ae0bed8846
commit b918220f94
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

View File

@ -272,7 +272,7 @@ pub struct WasmConfig {
pub key_value_stores: Vec<String>,
/// Optional list of sqlite databases the component is allowed to use.
pub sqlite_databases: Vec<String>,
/// Optional list of allowed llms the component is allowed to use
/// Optional list of allowed ai models the component is allowed to use
pub ai_models: Vec<String>,
}

View File

@ -3,7 +3,10 @@ pub(crate) async fn build_component(
use_gpu: bool,
) -> spin_llm::LlmComponent {
spin_llm::LlmComponent::new(
runtime_config.state_dir().unwrap_or_default().join("llms"),
runtime_config
.state_dir()
.unwrap_or_default()
.join("ai-models"),
use_gpu,
)
.await