Skip to content

Commit

Permalink
Move ollama deletion into gtoolkit-specific package [feenkcom/gtoolki…
Browse files Browse the repository at this point in the history
  • Loading branch information
hellerve committed Mar 3, 2025
1 parent 68b9690 commit 50cb53a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 11 additions & 0 deletions src/Gt4Ollama-GToolkit/GtOllamaClient.extension.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
Extension { #name : #GtOllamaClient }

{ #category : #'*Gt4Ollama-GToolkit' }
GtOllamaClient >> delete: aString withEntity: anEntity [
ZnClient new
timeout: 600;
beOneShot;
url: self baseUrl / aString;
method: #DELETE;
entity: (ZnEntity json: (STONJSON toString: anEntity));
execute
]

{ #category : #'*Gt4Ollama-GToolkit' }
GtOllamaClient >> initializeClient [
| aClient |
Expand Down
11 changes: 0 additions & 11 deletions src/Gt4Ollama/GtOllamaClient.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,6 @@ GtOllamaClient >> defaultBaseUrl [
^ 'http://localhost:11434/api' asZnUrl
]

{ #category : #accessing }
GtOllamaClient >> delete: aString withEntity: anEntity [
ZnClient new
timeout: 600;
beOneShot;
url: self baseUrl / aString;
method: #DELETE;
entity: (ZnEntity json: (STONJSON toString: anEntity));
execute
]

{ #category : #accessing }
GtOllamaClient >> deleteModel: aString [
^ GtOllamaDeleteModelClient new
Expand Down

0 comments on commit 50cb53a

Please sign in to comment.