mirror of
https://github.com/tcsenpai/agenticSeek.git
synced 2025-06-06 11:05:26 +00:00
SEE desc
MOD: to let user setting config.ini
This commit is contained in:
parent
e552e7cd04
commit
53e7707bc7
6
config.ini
Normal file
6
config.ini
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[MAIN]
|
||||||
|
is_local = False
|
||||||
|
provider_name = ollama
|
||||||
|
provider_model = deepseek-r1:32b
|
||||||
|
provider_server_address = 127.0.0.1:6666
|
||||||
|
agent_name = jarvis
|
20
main.py
20
main.py
@ -3,6 +3,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import signal
|
import signal
|
||||||
import argparse
|
import argparse
|
||||||
|
import configparser
|
||||||
|
|
||||||
from sources.llm_provider import Provider
|
from sources.llm_provider import Provider
|
||||||
from sources.interaction import Interaction
|
from sources.interaction import Interaction
|
||||||
@ -14,21 +15,26 @@ parser.add_argument('--speak', action='store_true',
|
|||||||
help='Make AI use text-to-speech')
|
help='Make AI use text-to-speech')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
config = configparser.ConfigParser()
|
||||||
|
config.read('config.ini')
|
||||||
|
|
||||||
def handleInterrupt(signum, frame):
|
def handleInterrupt(signum, frame):
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
signal.signal(signal.SIGINT, handler=handleInterrupt)
|
signal.signal(signal.SIGINT, handler=handleInterrupt)
|
||||||
|
|
||||||
#local_provider = Provider("ollama", "deepseek-r1:14b", "127.0.0.1:5000")
|
if config.getboolean('MAIN', 'is_local'):
|
||||||
server_provider = Provider(provider_name="server",
|
provider = Provider(config["MAIN"]["provider_name"], config["MAIN"]["provider_model"], config["MAIN"]["provider_server_address"])
|
||||||
model="deepseek-r1:14b",
|
else:
|
||||||
server_address="192.168.1.100:5000")
|
provider = Provider(provider_name=config["MAIN"]["provider_name"],
|
||||||
|
model=config["MAIN"]["provider_model"],
|
||||||
|
server_address=config["MAIN"]["provider_server_address"])
|
||||||
|
|
||||||
agent = CoderAgent(model="deepseek-r1:14b",
|
agent = CoderAgent(model=config["MAIN"]["provider_model"],
|
||||||
name="jarvis",
|
name=config["MAIN"]["agent_name"],
|
||||||
prompt_path="prompts/coder_agent.txt",
|
prompt_path="prompts/coder_agent.txt",
|
||||||
provider=server_provider)
|
provider=provider)
|
||||||
|
|
||||||
interaction = Interaction([agent], tts_enabled=args.speak)
|
interaction = Interaction([agent], tts_enabled=args.speak)
|
||||||
while interaction.is_active:
|
while interaction.is_active:
|
||||||
|
@ -11,4 +11,10 @@ scipy==1.15.1
|
|||||||
kokoro==0.7.12
|
kokoro==0.7.12
|
||||||
flask==3.1.0
|
flask==3.1.0
|
||||||
soundfile==0.13.1
|
soundfile==0.13.1
|
||||||
termcolor
|
termcolor
|
||||||
|
|
||||||
|
# if use chinese
|
||||||
|
ordered_set
|
||||||
|
pypinyin
|
||||||
|
cn2an
|
||||||
|
jieba
|
Loading…
x
Reference in New Issue
Block a user