File size: 1,449 Bytes
3653851
 
 
 
70aa23a
 
3653851
 
 
 
 
 
70aa23a
3653851
 
70aa23a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3653851
70aa23a
 
 
 
 
 
3653851
bf716d8
bb8feed
bf716d8
3653851
 
 
 
70aa23a
3653851
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import asyncio
from workflows.base import build_workflow_with_state
from event_handlers import PrintEventHandler
from langchain_core.messages import HumanMessage
from utils.freeplay_helpers import FreeplayClient
from utils.zep_helpers import ZepClient

from prompts import (
    casual_fan_prompt,
    HumanMessage,
    AIMessage,
)
user_id = "huge@hugeinc.com"


# workflow, state = build_workflow_with_state(
#     handler=PrintEventHandler(),
#     session_id='5aed14ff09fb415ba77439409f458909',
#     messages=[
#         HumanMessage(content="tell me about some players in everglade fc"),
#     ],
# )

zep_session_id = ZepClient() \
                .get_or_create_user(user_id, "Hugh", "Bigly") \
                .create_session() \
                .session_id
freeplay_session_id = FreeplayClient().create_session().session_id

workflow_bundle, state = build_workflow_with_state(
    handler=PrintEventHandler(),
    zep_session_id=zep_session_id,
    freeplay_session_id=freeplay_session_id,
    email=user_id,
    first_name="Hugh",
    last_name="Bigly",
    persona="Casual Fan",
    messages=[
        # HumanMessage(content="tell me about some players in everglade fc"),
        # HumanMessage(content="tell me about the league")
        HumanMessage(content="tell me about Ryan Martinez of everglade fc")
    ],
)

async def main():
    await workflow_bundle.workflow.ainvoke(state)

if __name__ == "__main__":
    asyncio.run(main())