update
This commit is contained in:
@@ -24,16 +24,7 @@ using .interface
|
||||
|
||||
#------------------------------------------------------------------------------------------------100
|
||||
|
||||
""" version 0.0.4
|
||||
Todo:
|
||||
- [*1] cartesianAssign for different matrix dimension
|
||||
|
||||
Change from version: 0.0.3
|
||||
-
|
||||
|
||||
All features
|
||||
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ export generate_msgMeta
|
||||
# sendMqttMsg, sendReceiveMqttMsg, mqttClientInstance, mqttClientInstance_v2,
|
||||
# dataTransferOverMQTT_sender, dataTransferOverMQTT_receiver
|
||||
|
||||
using JSON3, DataStructures, Distributions, Random, Dates, UUIDs, DataFrames,
|
||||
using JSON, DataStructures, Distributions, Random, Dates, UUIDs, DataFrames,
|
||||
SHA, PrettyPrinting
|
||||
using ..util
|
||||
|
||||
#[PENDING] update code to use JSON
|
||||
# ---------------------------------------------- 100 --------------------------------------------- #
|
||||
|
||||
# abstract type mqttClientInstance end
|
||||
|
||||
@@ -2,10 +2,10 @@ module dbUtil
|
||||
|
||||
export dictToPostgresKeyValueString, generateInsertSQL, generateUpdateSQL
|
||||
|
||||
using JSON3, DataStructures, Distributions, Random, Dates, UUIDs, DataFrames,
|
||||
using JSON, DataStructures, Distributions, Random, Dates, UUIDs, DataFrames,
|
||||
SHA
|
||||
using ..util
|
||||
|
||||
#[PENDING] update code to use JSON
|
||||
# ---------------------------------------------- 100 --------------------------------------------- #
|
||||
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ export noNegative!, randomWithProb, randomChoiceWithProb, findIndex, limitvalue,
|
||||
isLess, allTrue, getStringBetweenCharacters, JSON3read_stringKey, mkDictPath!,
|
||||
getDictPath, detectKeywordVariation, textToDict
|
||||
|
||||
using JSON3, DataStructures, Distributions, Random, Dates, UUIDs, DataFrames, CSV
|
||||
using JSON, DataStructures, Distributions, Random, Dates, UUIDs, DataFrames, CSV
|
||||
using ..util, ..communication
|
||||
|
||||
#[WORKING] update code to use JSON
|
||||
# ---------------------------------------------- 100 --------------------------------------------- #
|
||||
|
||||
noNegative!(a::AbstractVector) = replace!(x -> x < 0 ? 0 : x, a)
|
||||
|
||||
@@ -2,11 +2,11 @@ module llmUtil
|
||||
|
||||
export formatLLMtext, formatLLMtext_llama3instruct, jsoncorrection, deFormatLLMtext, extractthink
|
||||
|
||||
using UUIDs, JSON3, Dates
|
||||
using UUIDs, JSON, Dates
|
||||
using GeneralUtils
|
||||
|
||||
# ---------------------------------------------- 100 --------------------------------------------- #
|
||||
|
||||
#[PENDING] update code to use JSON
|
||||
|
||||
""" Convert a single chat dictionary into LLM model instruct format.
|
||||
|
||||
|
||||
10
src/util.jl
10
src/util.jl
@@ -9,7 +9,7 @@ export timedifference, showstracktrace, findHighestIndexKey, uuid4snakecase, rep
|
||||
extractTextBetweenCharacter, extractTextBetweenString,
|
||||
convertCamelSnakeKebabCase, fitrange, recentElementsIndex, nonRecentElementsIndex
|
||||
|
||||
using JSON3, DataStructures, Distributions, Random, Dates, UUIDs, DataFrames
|
||||
using JSON, DataStructures, Distributions, Random, Dates, UUIDs, DataFrames
|
||||
|
||||
# ---------------------------------------------- 100 --------------------------------------------- #
|
||||
|
||||
@@ -378,7 +378,7 @@ end
|
||||
|
||||
# Example
|
||||
```jldoctest
|
||||
julia> using DataFrames, JSON3, GeneralUtils
|
||||
julia> using DataFrames, GeneralUtils
|
||||
julia> df = DataFrame(A = [1, 2, 3], B = ["apple", "banana", "cherry"])
|
||||
julia> vectorDict = GeneralUtils.dfToVectorDict(df)
|
||||
[Dict{String, Any}("B" => "apple", "A" => 1),
|
||||
@@ -416,7 +416,7 @@ end
|
||||
|
||||
# Example
|
||||
```jldoctest
|
||||
julia> using GeneralUtils, Dates, JSON3, UUIDs
|
||||
julia> using GeneralUtils, Dates, UUIDs
|
||||
julia> vecDict = [Dict("a" => i) for i in 1:10]
|
||||
julia> d = GeneralUtils.disintegrate_vectorDict(vecDict, 3)
|
||||
julia> println(d[:data])
|
||||
@@ -568,7 +568,7 @@ end
|
||||
|
||||
# Example
|
||||
```jldoctest
|
||||
julia> using DataFrames
|
||||
julia> using DataFrames, GeneralUtils
|
||||
|
||||
julia> df = DataFrame(name=["Alice", "Bob"], age=[25, 30])
|
||||
2×2 DataFrame
|
||||
@@ -578,7 +578,7 @@ end
|
||||
│ 1 │ Alice 25
|
||||
│ 2 │ Bob 30
|
||||
|
||||
julia> dataframe_to_json_list(df)
|
||||
julia> GeneralUtils.dataframe_to_json_list(df)
|
||||
2-element Vector{String}:
|
||||
"{\"name\":\"Alice\",\"age\":25}"
|
||||
"{\"name\":\"Bob\",\"age\":30}"
|
||||
|
||||
Reference in New Issue
Block a user