Skip to content

Commit

Permalink
Fix a few things that were lost in translation [feenkcom/gtoolkit#4322]
Browse files Browse the repository at this point in the history
  • Loading branch information
hellerve committed Mar 3, 2025
1 parent ae688a2 commit 5ae5c55
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 6 deletions.
45 changes: 45 additions & 0 deletions src/Gt4Llm/GtLlmEmbeddingRegistry.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,54 @@ Class {
#instVars : [
'embeddings'
],
#classInstVars : [
'uniqueInstance'
],
#category : #Gt4Llm
}

{ #category : #'as yet unclassified' }
GtLlmEmbeddingRegistry class >> cleanUniqueInstance [
uniqueInstance := nil.
]

{ #category : #'as yet unclassified' }
GtLlmEmbeddingRegistry class >> cleanUp [
self cleanUniqueInstance
]

{ #category : #'as yet unclassified' }
GtLlmEmbeddingRegistry class >> default [
^ self uniqueInstance
]

{ #category : #'as yet unclassified' }
GtLlmEmbeddingRegistry class >> gtInstanceButtonFor: anAction [
<gtClassAction>
^ anAction button
tooltip: 'Inspect unique instance';
priority: 10;
icon: BrGlamorousVectorIcons playinspect;
action: [ :aButton | aButton phlow spawnObject: self uniqueInstance]
]

{ #category : #'as yet unclassified' }
GtLlmEmbeddingRegistry class >> hasUniqueInstance [

^ uniqueInstance isNotNil
]

{ #category : #'as yet unclassified' }
GtLlmEmbeddingRegistry class >> instance [
<gtExample>
^ self uniqueInstance
]

{ #category : #'as yet unclassified' }
GtLlmEmbeddingRegistry class >> uniqueInstance [
^ uniqueInstance ifNil: [ uniqueInstance := self new ]
]

{ #category : #accessing }
GtLlmEmbeddingRegistry >> at: anInput [
^ embeddings at: anInput
Expand Down
2 changes: 1 addition & 1 deletion src/Gt4Ollama/GtOllamaThreadMessage.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ GtOllamaThreadMessage >> evalDuration [

{ #category : #accessing }
GtOllamaThreadMessage >> evalDuration: anObject [
evalDuration := anObject ifNotNil: [ :aValue | aValue nanoseconds ]
evalDuration := anObject ifNotNil: [ :aValue | aValue nanoSeconds ]
]

{ #category : #accessing }
Expand Down
5 changes: 5 additions & 0 deletions src/Gt4OpenAI/GtOpenAIActionMessage.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ Class {
#classTraits : 'TGtActionMessage classTrait',
#category : #Gt4OpenAI
}

{ #category : #'as yet unclassified' }
GtOpenAIActionMessage >> textBlock [
^ self contentJson at: 'Text' ifAbsent: [ '' ]
]
5 changes: 0 additions & 5 deletions src/Gt4OpenAI/GtOpenAIMessage.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,6 @@ GtOpenAIMessage >> hasStep [
^ self step isNotNil
]

{ #category : #accessing }
GtOpenAIMessage >> id [
^ self explicitRequirement
]

{ #category : #'as yet unclassified' }
GtOpenAIMessage >> idString [
^ nil
Expand Down

0 comments on commit 5ae5c55

Please sign in to comment.