forked from nickthecook/archyve
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a repl with some handy classes instantiated
- Loading branch information
nick
committed
Aug 21, 2024
1 parent
f971df6
commit 090471f
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
puts "Loading REPL in Rails environment..." | ||
|
||
chromadb = Chromadb::Client.new | ||
embedder = Embedder.new(model_config: Setting.embedding_model) | ||
chat = Helpers::ModelClientHelper.new(model_config: Setting.chat_model) | ||
neo4j = Neo4j::Driver::GraphDatabase.driver( | ||
ENV.fetch('NEO4J_URL', 'neo4j://localhost:7687'), | ||
Neo4j::Driver::AuthTokens.basic(ENV.fetch('NEO4J_USERNAME', 'neo4j'), ENV.fetch('NEO4J_PASSWORD', 'password')) | ||
) | ||
|
||
puts <<~HELP | ||
Available tools: | ||
|
||
- chromadb: a ChromaDB client | ||
- embedder: an Embedder instance | ||
- chat: an Ollama client for the chat model | ||
- neo4j: a Neo4j driver | ||
HELP | ||
|
||
binding.pry | ||
|
||
puts "Exiting REPL..." |