update
This commit is contained in:
@@ -3,7 +3,8 @@ module llmfunction
|
||||
export wikisearch
|
||||
|
||||
using HTTP, JSON3
|
||||
|
||||
using GeneralUtils
|
||||
using ..utils
|
||||
#------------------------------------------------------------------------------------------------100
|
||||
|
||||
"""
|
||||
@@ -24,7 +25,7 @@ function wikisearch(phrase::T) where {T<:AbstractString}
|
||||
phrase = phrase[1] == " " ? phrase[2:end] : phrase
|
||||
# prepare input phrase
|
||||
if occursin("\"", phrase)
|
||||
phrase = GeneralUtils.getStringBetweenCharacters(toolinput, "\"", "\"")
|
||||
phrase = GeneralUtils.getStringBetweenCharacters(phrase, "\"", "\"")
|
||||
end
|
||||
phrase = replace(phrase, "\n"=>"")
|
||||
|
||||
@@ -45,6 +46,10 @@ function wikisearch(phrase::T) where {T<:AbstractString}
|
||||
if result == ""
|
||||
result = "No info available."
|
||||
end
|
||||
|
||||
if result != "No info available." #TODO for use with wikisearch(). Not good for other tools
|
||||
result = makeSummary(a, result)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
@@ -99,7 +104,6 @@ end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user