Module: Luogu
- Defined in:
- lib/luogu.rb,
lib/luogu/cli.rb,
lib/luogu/aiui.rb,
lib/luogu/base.rb,
lib/luogu/agent.rb,
lib/luogu/error.rb,
lib/luogu/utils.rb,
lib/luogu/plugin.rb,
lib/luogu/chatllm.rb,
lib/luogu/version.rb,
lib/luogu/terminal.rb,
lib/luogu/application.rb,
lib/luogu/agent_runner.rb,
lib/luogu/history_queue.rb,
lib/luogu/prompt_parser.rb,
lib/luogu/prompt_template.rb
Defined Under Namespace
Modules: Application, CLI, OpenAI
Classes: AIUI, Agent, AgentRunner, AssertionError, Base, ChatLLM, Error, HistoryQueue, Plugin, PluginError, PromptParser, PromptTemplate, RequestError, Terminal
Constant Summary
collapse
- VERSION =
"0.2.6"
Class Method Summary
collapse
Class Method Details
.cli ⇒ Object
97
98
99
|
# File 'lib/luogu/cli.rb', line 97
def cli
Dry::CLI.new(Luogu::CLI::Commands).call
end
|
.println(message) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/luogu/utils.rb', line 4
def println(message)
if system("which glow > /dev/null 2>&1")
system("echo #{Shellwords.escape(message)} | glow -")
else
puts message
end
end
|
.wrap_array(obj) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/luogu/utils.rb', line 12
def wrap_array(obj)
if obj.is_a?(Array)
obj
else
[obj]
end
end
|