Fix: Se modifica ubicacion de las credenciales

This commit is contained in:
sinergia 2024-11-02 17:28:08 -05:00
parent 9e26bc4d7a
commit 1bf449bd2c
5 changed files with 9 additions and 5 deletions

View File

@ -36,7 +36,7 @@ llm = ChatOpenAI(
)
# Configuración de Gmail
# # Configuración de Gmail
toolkit = GmailToolkit()
credentials = get_gmail_credentials(
token_file="token.json",
@ -54,7 +54,7 @@ tools.extend([
create_calendar_event, get_company_info,
get_current_date_and_time])
# Definir el sistema prompt
# # Definir el sistema prompt
system_prompt = ChatPromptTemplate.from_messages(
[
(
@ -103,13 +103,13 @@ system_prompt = ChatPromptTemplate.from_messages(
)
# Definir el estado del asistente
# # Definir el estado del asistente
class State(TypedDict):
messages: Annotated[list, add_messages]
is_last_step: bool
# Crear el graph con el estado definido
# # Crear el graph con el estado definido
graph = create_react_agent(
model=llm,
tools=tools,
@ -124,7 +124,7 @@ async def redirect_root_to_docs():
return RedirectResponse("/docs")
# Edit this to add the chain you want to add
# # Edit this to add the chain you want to add
add_routes(
app,
llm,

1
credentials.json Normal file
View File

@ -0,0 +1 @@
{"installed":{"client_id":"19011937557-bi5nh4afvg4tuqr87v6dp55qj9a9o1h2.apps.googleusercontent.com","project_id":"oc-aassistent","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"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","redirect_uris":["http://localhost"]}}

1
credentials_2.json Normal file
View File

@ -0,0 +1 @@
{"installed":{"client_id":"629922809906-pl9l1ipout6d5hh19ku50sfvnqgu8ir2.apps.googleusercontent.com","project_id":"calendar-424503","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"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","redirect_uris":["http://localhost"]}}

1
token.json Normal file
View File

@ -0,0 +1 @@
{"token": "ya29.a0AeDClZABfltq9OLAHLaKOn2vHXVhOJSMTTe9HijkoZTexSswOMjnIlJj4-NV4TOwCq-wRKJadY7wppE2hAodyY3P0mHCzfpxbNZo0PGWMf2t6gmEDup4quGcIMHup1xjKETg0JkftCDepAh7UTi2tEg_YMeReI3TaZTvaMlScwaCgYKAewSARASFQHGX2MijepHh68yMlxXo_TGuquUPw0177", "refresh_token": "1//05nbircha66xlCgYIARAAGAUSNwF-L9IrxbE2v7kfLwXb4u0pD6Rin7xEBOTT83DeH7t2ttfD5CDmUCyhDsOaVRMRK_r8UtdoMq8", "token_uri": "https://oauth2.googleapis.com/token", "client_id": "19011937557-bi5nh4afvg4tuqr87v6dp55qj9a9o1h2.apps.googleusercontent.com", "client_secret": "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", "scopes": ["https://mail.google.com/"], "universe_domain": "googleapis.com", "account": "", "expiry": "2024-10-30T20:18:03.194400Z"}

1
token_2.json Normal file
View File

@ -0,0 +1 @@
{"token": "ya29.a0AeDClZChMN7SEvjp3dFVZtee2pDoqAoPFC7AWiEeIG7H6qN2HDnf7c6DcFuc--aG60e1cAnOpoKf80H8aqrFFYbF4-F4LE_vz9MY8oc21Ra9PwM16FYxGGKcM2wcrrOGaFncs9Um9_yNxzAa6MUVNq88Y_Bhpr2F2mO3o53NjQaCgYKAZESARASFQHGX2Mi7EodrKchyiyPIZ4y5Lwh0Q0177", "refresh_token": "1//05CtNC-Z3ii8qCgYIARAAGAUSNwF-L9IrbOfrB0kNACEJ5HX4T-fmdNUqsGFqn1QFlvK_1L9h0emULUS1yU85IbaNyESXZSQzHU8", "token_uri": "https://oauth2.googleapis.com/token", "client_id": "629922809906-pl9l1ipout6d5hh19ku50sfvnqgu8ir2.apps.googleusercontent.com", "client_secret": "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", "scopes": ["https://www.googleapis.com/auth/calendar"], "universe_domain": "googleapis.com", "account": "", "expiry": "2024-10-30T01:22:34.287442Z"}