diff --git a/packages/ollama_dart/README.md b/packages/ollama_dart/README.md index 0aaf5a97..27895b5b 100644 --- a/packages/ollama_dart/README.md +++ b/packages/ollama_dart/README.md @@ -251,11 +251,11 @@ await for (final res in stream) { #### Check if a Blob Exists -Check if a blob is known to the server. +Ensures that the file blob used for a FROM or ADAPTER field exists on the server. This is checking your Ollama server and not Ollama.ai. ```dart await client.checkBlob( - name: 'sha256:29fdb92e57cf0827ded04ae6461b5931d01fa595843f55d36f5b275a52087dd2', + digest: 'sha256:29fdb92e57cf0827ded04ae6461b5931d01fa595843f55d36f5b275a52087dd2', ); ``` diff --git a/packages/ollama_dart/lib/src/generated/client.dart b/packages/ollama_dart/lib/src/generated/client.dart index 3ab44797..a22d8729 100644 --- a/packages/ollama_dart/lib/src/generated/client.dart +++ b/packages/ollama_dart/lib/src/generated/client.dart @@ -605,26 +605,23 @@ class OllamaClient { /// Create a blob from a file. Returns the server file path. /// - /// `name`: the SHA256 digest of the blob + /// `digest`: the SHA256 digest of the blob /// /// `request`: No description /// /// `POST` `http://localhost:11434/api/blobs/{digest}` Future createBlob({ - required String name, + required String digest, String? request, }) async { final _ = await makeRequest( baseUrl: 'http://localhost:11434/api', - path: '/blobs/{digest}', + path: '/blobs/$digest', method: HttpMethod.post, isMultipart: false, requestType: 'application/octet-stream', responseType: '', body: request, - queryParams: { - 'name': name, - }, ); } @@ -632,24 +629,23 @@ class OllamaClient { // METHOD: checkBlob // ------------------------------------------ - /// Check to see if a blob exists on the Ollama server which is useful when creating models. + /// Ensures that the file blob used for a FROM or ADAPTER field exists on the server. /// - /// `name`: the SHA256 digest of the blob + /// This is checking your Ollama server and not Ollama.ai. + /// + /// `digest`: the SHA256 digest of the blob /// /// `HEAD` `http://localhost:11434/api/blobs/{digest}` Future checkBlob({ - required String name, + required String digest, }) async { final _ = await makeRequest( baseUrl: 'http://localhost:11434/api', - path: '/blobs/{digest}', + path: '/blobs/$digest', method: HttpMethod.head, isMultipart: false, requestType: '', responseType: '', - queryParams: { - 'name': name, - }, ); } } diff --git a/packages/ollama_dart/oas/ollama-curated.yaml b/packages/ollama_dart/oas/ollama-curated.yaml index b63d0c21..876bab50 100644 --- a/packages/ollama_dart/oas/ollama-curated.yaml +++ b/packages/ollama_dart/oas/ollama-curated.yaml @@ -198,10 +198,11 @@ paths: operationId: checkBlob tags: - Models - summary: Check to see if a blob exists on the Ollama server which is useful when creating models. + summary: Ensures that the file blob used for a FROM or ADAPTER field exists on the server. + description: This is checking your Ollama server and not Ollama.ai. parameters: - - in: query - name: name + - in: path + name: digest schema: type: string required: true @@ -218,8 +219,8 @@ paths: - Models summary: Create a blob from a file. Returns the server file path. parameters: - - in: query - name: name + - in: path + name: digest schema: type: string required: true