update
This commit is contained in:
@@ -26,7 +26,6 @@ function executeSQLVectorDB(sql)
|
||||
return result
|
||||
end
|
||||
|
||||
|
||||
function text2textInstructLLM(prompt::String)
|
||||
msgMeta = GeneralUtils.generate_msgMeta(
|
||||
config[:externalservice][:text2textinstruct][:mqtttopic];
|
||||
@@ -55,7 +54,6 @@ function text2textInstructLLM(prompt::String)
|
||||
return response
|
||||
end
|
||||
|
||||
|
||||
# get text embedding from a LLM service
|
||||
function getEmbedding(text::T) where {T<:AbstractString}
|
||||
msgMeta = GeneralUtils.generate_msgMeta(
|
||||
@@ -74,7 +72,7 @@ function getEmbedding(text::T) where {T<:AbstractString}
|
||||
:text => [text] # must be a vector of string
|
||||
)
|
||||
)
|
||||
response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg)
|
||||
response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg; timeout=6000)
|
||||
embedding = response[:response][:embeddings]
|
||||
return embedding
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user