You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The builder is used to build and run the app somewhere down here
19
19
```
20
20
21
21
### Configuration
22
22
23
-
The AddOllama method has optional arguments to set the `name`, `port`and `modelName`.
23
+
The AddOllama method has optional arguments to set the `name`and `port`.
24
24
The `name` is what gets displayed in the Aspire orchestration app against this component.
25
25
The `port` is provided randomly by Aspire. If for whatever reason you need a fixed port, you can set that here.
26
-
The `modelName` specifies what LLM to pull when it starts up. The default is `llama3`. You can also set this to null to prevent any models being pulled on startup - leaving you with a plain Ollama container to work with.
27
26
28
27
## Downloading the LLM
29
28
30
-
When the Ollama container for this component first spins up, this component will download the LLM (llama3 unless otherwise specified).
29
+
When the Ollama container for this component first spins up, this component will download the LLM(s).
31
30
The progress of this download will be displayed in the State column for this component on the Aspire orchestration app.
32
31
Important: Keep the Aspire orchestration app open until the download is complete, otherwise the download will be cancelled.
33
32
In the spirit of productivity, we recommend kicking off this process before heading for lunch.
@@ -45,8 +44,7 @@ Within that component (e.g. a web app), you can fetch the Ollama connection stri
45
44
Note that if you changed the name of the Ollama component via the `name` argument, then you'll need to use that here when specifying which connection string to get.
You can then call any of the Ollama endpoints through this connection string. We recommend using the [OllamaSharp](https://www.nuget.org/packages/OllamaSharp) client to do this.
/// <param name="name">The name of the resource. This name will be used as the connection string name when referenced in a dependency.</param>
18
-
/// <param name="port">An optional fixed port to bind to the Ollama container. This will be provided randomly by Aspire if not set.</param>
19
-
/// <param name="modelName">The name of the LLM to download on initial startup. llama3 by default. This can be set to null to not download any models.</param>
20
-
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
/// <param name="name">The name of the resource. This name will be used as the connection string name when referenced in a dependency.</param>
38
+
/// <param name="port">An optional fixed port to bind to the Ollama container. This will be provided randomly by Aspire if not set.</param>
39
+
/// <param name="modelName">The name of the LLM to download on initial startup. llama3 by default. This can be set to null to not download any models.</param>
40
+
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
41
+
/// <remarks>This is to maintain compatibility with the Raygun.Aspire.Hosting.Ollama package and will be removed in the next major release.</remarks>
42
+
[Obsolete("Use AddOllama without a model name, and then the AddModel extension method to add models.")]
await_notificationService.PublishUpdateAsync(resource, state =>statewith{State=newResourceStateSnapshot("No connection string",KnownResourceStateStyles.Error)});
await_notificationService.PublishUpdateAsync(resource, state =>statewith{State=newResourceStateSnapshot("No connection string",KnownResourceStateStyles.Error)});
49
+
return;
50
+
}
57
51
58
-
await_notificationService.PublishUpdateAsync(resource, state =>statewith{State=newResourceStateSnapshot("Checking model",KnownResourceStateStyles.Info)});
await_notificationService.PublishUpdateAsync(resource, state =>statewith{State=newResourceStateSnapshot($"Checking {model}",KnownResourceStateStyles.Info)});
await_notificationService.PublishUpdateAsync(resource, state =>statewith{State=newResourceStateSnapshot("Downloading model",KnownResourceStateStyles.Info)});
111
+
await_notificationService.PublishUpdateAsync(resource, state =>statewith{State=newResourceStateSnapshot($"Downloading {model}",KnownResourceStateStyles.Info)});
0 commit comments