Compare commits
2 Commits
e7dbc443aa
...
243afd2f01
Author | SHA1 | Date |
---|---|---|
Falko Victor Habel | 243afd2f01 | |
Falko Victor Habel | 038b1f3e92 |
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"mode": "gui",
|
||||
"ollamaConfig": {
|
||||
"base_url": "http://localhost:11434",
|
||||
"embeddings_url": "http://localhost:11434",
|
||||
"base_model": "mistral",
|
||||
"embeddings_model": "mxbai-embed-large",
|
||||
"base_header": {
|
||||
"": ""
|
||||
},
|
||||
"embeddings_header": {
|
||||
"": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,6 +6,7 @@ import os
|
|||
import sys
|
||||
|
||||
CONFIG_FILE = "config/config.json"
|
||||
ERROR_CORRPUTED_CONFIG = "The config file seems to be corrupted, please run: 'python project.py --config'"
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="Write with Ollama, using standard chat or RAG system, for \n\
|
||||
|
@ -36,8 +37,9 @@ def main():
|
|||
gui = ChatGUI(**config["ollamaConfig"])
|
||||
gui.mainloop()
|
||||
except TypeError:
|
||||
sys.exit("The config file seems to be corrupted, please run: 'python project.py --config'")
|
||||
sys.exit("No Config available. please run: 'python project.py --config' to set it up")
|
||||
sys.exit(ERROR_CORRPUTED_CONFIG)
|
||||
else:
|
||||
sys.exit(ERROR_CORRPUTED_CONFIG)
|
||||
|
||||
|
||||
|
||||
|
@ -92,7 +94,7 @@ def handle_terminal(args):
|
|||
bot = TerminalBot(args.p, args.f, **config["ollamaConfig"])
|
||||
bot.start()
|
||||
except TypeError:
|
||||
sys.exit("The config file seems to be corrupted, please run: 'python project.py --config'")
|
||||
sys.exit(ERROR_CORRPUTED_CONFIG)
|
||||
elif args.f:
|
||||
sys.exit("failure: prompt needed")
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue