refactoring

This commit is contained in:
maglore9900 2024-10-02 11:01:52 -04:00
parent 383b584270
commit 03fc980f4c
7 changed files with 19 additions and 32 deletions

View File

@ -1,3 +1,15 @@
OPENAI_API_KEY='OPENAI API KEY HERE' OPENAI_API_KEY=''
OLLAMA_MODEL='llama3' #LLM_TYPE will take openai, local, or hybrid
OLLAMA_URL='https://localhost:11434' LLM_TYPE='openai'
OPENAI_MODEL='gpt-4o-mini'
#OLLAMA_MODEL will take any model you can load in ollama
OLLAMA_MODEL='llama'
OLLAMA_URL='http://10.0.0.231:11434'
spotify_client_id = ''
spotify_client_secret = ''
spotify_redirect_uri = 'http://localhost:8888/callback'

View File

@ -1,5 +1,9 @@
from modules import agent from modules import agent
import asyncio import asyncio
import environ
env = environ.Env()
environ.Env.read_env()
loop = asyncio.new_event_loop() loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop) asyncio.set_event_loop(loop)

View File

@ -3,12 +3,10 @@ import operator
from modules import adapter, speak, prompts, spotify, app_launcher, windows_focus from modules import adapter, speak, prompts, spotify, app_launcher, windows_focus
from langchain_core.agents import AgentAction, AgentFinish from langchain_core.agents import AgentAction, AgentFinish
from langchain.agents import create_openai_tools_agent from langchain.agents import create_openai_tools_agent
from langchain.prompts import PromptTemplate, SystemMessagePromptTemplate
from langchain import hub from langchain import hub
from langchain_core.tools import tool from langchain_core.tools import tool
from langgraph.graph import StateGraph, END from langgraph.graph import StateGraph, END
import asyncio import asyncio
import time
import subprocess import subprocess

Binary file not shown.

Before

Width:  |  Height:  |  Size: 650 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

View File

@ -1,15 +0,0 @@
OPENAI_API_KEY=''
#LLM_TYPE will take openai, local, or hybrid
LLM_TYPE='openai'
OPENAI_MODEL='gpt-4o-mini'
#OLLAMA_MODEL will take any model you can load in ollama
OLLAMA_MODEL='llama'
OLLAMA_URL='http://10.0.0.231:11434'
spotify_client_id = ''
spotify_client_secret = ''
spotify_redirect_uri = 'http://localhost:8888/callback'

View File

@ -1,15 +1,3 @@
# import time
# from win10toast import ToastNotifier
# def start_timer(seconds):
# print(f"Timer started for {seconds} seconds...")
# time.sleep(seconds)
# toaster = ToastNotifier()
# toaster.show_toast("Timer Finished", "Your time is up!", duration=10)
# # Example: Set a timer for 60 seconds
# start_timer(5)
import time import time
from plyer import notification from plyer import notification