-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
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,14 @@ | ||
from langchain.agents.agent_toolkits import GmailToolkit | ||
from langchain_openai import ChatOpenAI | ||
from langchain.agents import AgentType,initialize_agent | ||
|
||
toolkit=GmailToolkit() | ||
llm=ChatOpenAI(model="gpt-4o") | ||
agent=initialize_agent(tools=toolkit.get_tools(),llm=llm,verbose=True,max_iterations=1000,max_execution_time=1600,agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION) | ||
#agent.handle_parsing_errors=True | ||
def runAgent(input): | ||
try: | ||
response=agent.run(input) | ||
return response | ||
except Exception as e: | ||
return response |
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,10 @@ | ||
from streamlit_mic_recorder import speech_to_text | ||
import streamlit as st | ||
from emailAgent import runAgent | ||
|
||
st.title("your one stop voice enable email Assistant") | ||
st.write("instruct your voice and see the magic") | ||
text=speech_to_text(language="en",use_container_width=True,just_once=True,key="STT") | ||
if text: | ||
response=runAgent(text) | ||
st.write(response) |
Binary file not shown.
Empty file.
This file was deleted.
Oops, something went wrong.