Skip to content

Commit

Permalink
Patched bug when installing symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
Zohran committed Aug 7, 2024
1 parent 50947d0 commit 12e5e0c
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
10 changes: 8 additions & 2 deletions ISM/AI.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ module ISM

module AI

#Note: Threads need to be implemented properly
Name = "Epsilon"
ModeleFile = "gemma-2-9b-it-Q4_K_M.gguf"
ModeleDirectory = "/modeles"
ModelePath = "#{ModeleDirectory}/#{ModeleFile}"
Prompt = "You are an assistant call Epsilon, and you answer user request in polite and accurate manner"
CommandPath = "/usr/bin/llama-cli"
Prompt = "You are an assistant name #{name}, and you answer user request in polite and accurate manner"
Parameters = "--chat-template vicuna-orca --n-predict 512 --threads 8 --ctx-size 2048 --temp 0.9 --top-k 80 --repeat-penalty 1.1 --no-display-prompt --log-disable"
Commands = {"" => ""}
#Threads need to be implemented properly

def self.available : Bool
return File.exists?(CommandPath)
end

def self.askRequest(request : String) : String
processResult = IO::Memory.new
Expand Down
41 changes: 41 additions & 0 deletions ISM/CommandLine.cr
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,47 @@ module ISM
return result
end

# def checkEnteredArguments
# matchingOption = false
#
# terminalTitleArguments = (ARGV.empty? ? "" : ARGV.join(" "))
# setTerminalTitle("#{ISM::Default::CommandLine::Name} #{terminalTitleArguments}")
#
# if ARGV.empty?
# matchingOption = true
# @options[0+@debugLevel].start
# resetTerminalTitle
# else
# @options.each_with_index do |argument, index|
# if ARGV[0] == ISM::Default::Option::Debug::ShortText || ARGV[0] == ISM::Default::Option::Debug::LongText
# @debugLevel = 1
# end
#
# if @debugLevel == 0 || @debugLevel == 1 && ARGV.size < 2 || @debugLevel == 1 && ARGV.size == 1
# if ARGV[0] == argument.shortText || ARGV[0] == argument.longText
# matchingOption = true
# @options[index].start
# resetTerminalTitle
# break
# end
# end
#
# if @debugLevel == 1 && ARGV.size > 1
# if ARGV[0+@debugLevel] == argument.shortText || ARGV[0+@debugLevel] == argument.longText
# matchingOption = true
# @options[index].start
# resetTerminalTitle
# break
# end
# end
# end
# end
#
# if !matchingOption
# showErrorUnknowArgument
# end
# end

def checkEnteredArguments
matchingOption = false

Expand Down
3 changes: 2 additions & 1 deletion ISM/Software.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,8 @@ module ISM
deleteFileNoChroot(finalDestination)
end

moveFileNoChroot(entry,finalDestination)
File.symlink?(entry) ? moveFile(entry,finalDestination) : moveFileNoChroot(entry,finalDestination)

installedFiles << "/#{finalDestination.sub(Ism.settings.rootPath,"")}".squeeze("/")
end

Expand Down

0 comments on commit 12e5e0c

Please sign in to comment.