Class: Rubee::CLI::Bee
- Inherits:
-
Object
- Object
- Rubee::CLI::Bee
- Defined in:
- lib/rubee/cli/bee.rb
Constant Summary collapse
- VERSION =
"0.1.0"- KNOWLEDGE_FILE =
── Config ───────────────────────────────────────────────────────────────
ENV.fetch("BEE_KNOWLEDGE", File.join(__dir__, "bee_knowledge.json"))
- README_GLOB =
"readme.md"- TOP_K =
sections merged as answer
2- CONFIDENCE_THRESHOLD =
cosine score below which we admit we don’t know
0.05- WORD_DELAY =
seconds between words when typewriting
0.045- WORD_JITTER =
random extra delay for realism
0.030- OLLAMA_URL =
ENV.fetch("OLLAMA_URL", "http://localhost:11434")
- OLLAMA_DEFAULT_MODEL =
"qwen2.5:1.5b"- STOPWORDS =
%w[ a an the is are was were be been being have has had do does did will would could should may might shall can i you we they he she it what how when where why which who whom whose that this these those to of in on at by for with about from into as if up out so or and me my your our its their s re ll ve dont doesnt didnt isnt wasnt please tell show just also note make sure example following get set run using use via rubee rube ru bee ].freeze
- CONFUSED =
[ "That's outside my hive. Try rephrasing?", "I don't have anything on that in the README.", "Nothing in the docs matches that — try https://rubee.dedyn.io/", "I'm not sure about that one. Check https://rubee.dedyn.io/" ].freeze
- THINKING_FRAMES =
["⬡ ⬢ ⬢", "⬢ ⬡ ⬢", "⬢ ⬢ ⬡", "⬢ ⬡ ⬢"].freeze
Class Method Summary collapse
Class Method Details
.call(_command, argv) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/rubee/cli/bee.rb', line 41 def call(_command, argv) args = argv[1..].map(&:to_s) # Extract --llm[=model] flag llm_flag = args.find { |a| a.start_with?("--llm") } args.delete(llm_flag) llm_model = if llm_flag llm_flag.include?("=") ? llm_flag.split("=", 2).last : OLLAMA_DEFAULT_MODEL end sub = args.first.to_s.strip.downcase case sub when "generate", "gen" then generate when "" then interactive_mode(llm_model) else single_mode(args.join(" "), llm_model) end end |