update
This commit is contained in:
12
src/util.jl
12
src/util.jl
@@ -1,6 +1,6 @@
|
||||
module util
|
||||
|
||||
export clearhistory, addNewMessage, vectorOfDictToText, eventdict
|
||||
export clearhistory, addNewMessage, vectorOfDictToText, eventdict, noises
|
||||
|
||||
using UUIDs, Dates, DataStructures, HTTP, MQTTClient, JSON3
|
||||
using GeneralUtils
|
||||
@@ -181,7 +181,15 @@ function eventdict(;
|
||||
end
|
||||
|
||||
|
||||
|
||||
noise(n::Integer) = String(rand('a':'z', n))
|
||||
function noises(totalword::Integer, wordlength::Integer)
|
||||
noises = ""
|
||||
for i in 1:totalword
|
||||
noises *= noise(wordlength) * " "
|
||||
end
|
||||
noises = strip(noises)
|
||||
return noises
|
||||
end
|
||||
|
||||
|
||||
# """ Convert a single chat dictionary into LLM model instruct format.
|
||||
|
||||
Reference in New Issue
Block a user