Skip to content

Commit

Permalink
Make UUID class overridable [feenkcom/gtoolkit#4322]
Browse files Browse the repository at this point in the history
  • Loading branch information
hellerve committed Mar 3, 2025
1 parent aa72a94 commit 68b9690
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/Gt4Llm-GToolkit/GtLlmChatMessage.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ GtLlmChatMessage >> gtContentFor: aView [
stencil: [ GtLlmThreadMessageElement new
threadMessageViewModel: self asViewModel ]
]

{ #category : #'*Gt4Llm-GToolkit' }
GtLlmChatMessage >> uuidClass [
^ UUID
]
2 changes: 1 addition & 1 deletion src/Gt4Llm/GtLlmChatMessage.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ GtLlmChatMessage >> id: anId [

{ #category : #accessing }
GtLlmChatMessage >> initialize [
id := UUID new.
id := self uuidClass new.
createdAt := DateAndTime now
]

Expand Down
6 changes: 6 additions & 0 deletions src/Gt4Ollama-GToolkit/GtOllamaProvider.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Extension { #name : #GtOllamaProvider }

{ #category : #'*Gt4Ollama-GToolkit' }
GtOllamaProvider >> uuidClass [
^ UUID
]
2 changes: 1 addition & 1 deletion src/Gt4Ollama/GtOllamaProvider.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ GtOllamaProvider >> initializeClient [
{ #category : #'as yet unclassified' }
GtOllamaProvider >> instructions: aString [
| internalModelName modelFile |
internalModelName := 'gt-tutor-' , self model , '-' , UUID new asString.
internalModelName := 'gt-tutor-' , self model , '-' , self uuidClass new asString.
modelFile := GtLlmModelFile new
from: self model;
system: aString.
Expand Down

0 comments on commit 68b9690

Please sign in to comment.