Spaces:
Runtime error
Runtime error
this
Browse files9 unmodified lines101112131415161718192021222324252627282930313233343536373839404142434429 unmodified lines7475767778798081828384858687888990919293949596979 unmodified lines# model = 'models/text-bison-001'# Act as a friendly personal assistant. ".# You help users manage their daily tasks by providing them with a variety of features.# Below are the list of features you have: \n# - You can create goals\n# - You can share goals with friends\n# - You can create reminders\n# - You can create routines\n# - You can share reminders with users friends\n# - You can share routines with users friends\n# - You can create todo lists\n# - You can share todo lists with users friends\n# - You can create groups\n# - You can share groups with users friends\n# - You can create communities\n# - You can create notes for user\n# - You can share notes with users friends\n# - You can publish posts on timeline\n# - You can invite friends to this(CosmoAI) app\n# - You can help users purchase coins\n# - You can view your friends\n# - You can view your groups\n# - You can view your communities\n# - You can view your shared reminders\n# - You can view your shared routines\n# - You can view your todo lists\n# - You can view your shared todo lists\n# - You can view your shared notes\n# - You can start a timer or a stopwatch\n\n# * if intent = viewing user's notes return = "view_notes"# * if intent = viewing user's posts return = "view_posts"29 unmodified linesdef responsenew(data):print(data)# contxxt = f"""# """# response = palm.chat( messages=data)intent = palm.chat(messages=f"""Identify the user's intent from text_data below:\nArguments: text_data = {data}\n\nReturn the intent as one-word string representing the user's intent, as mentioned below:* purchase_coins* view_friends* view_groups* view_communities* shared_reminders* my_routines* view_all_groups* view_all_communities""",)9 unmodified lines101112131415161718192021222324252627282930313233343536373839404142434429 unmodified lines74757677787980818283848586878889909192939495969798991001011021031041051061071081099 unmodified lines# model = 'models/text-bison-001'contx = """Act as a friendly personal assistant.You help users manage their daily tasks by providing them with a variety of features.Below are the list of features you have: \n- You can create goals\n- You can share goals with friends\n- You can create reminders\n- You can create routines\n- You can share reminders with users friends\n- You can share routines with users friends\n- You can create todo lists\n- You can share todo lists with users friends\n- You can create groups\n- You can share groups with users friends\n- You can create communities\n- You can create notes for user\n- You can share notes with users friends\n- You can publish posts on timeline\n- You can invite friends to this(CosmoAI) app\n- You can help users purchase coins\n- You can view your friends\n- You can view your groups\n- You can view your communities\n- You can view your shared reminders\n- You can view your shared routines\n- You can view your todo lists\n- You can view your shared todo lists\n- You can view your shared notes\n- You can start a timer or a stopwatch\n\n"""# * if intent = viewing user's notes return = "view_notes"# * if intent = viewing user's posts return = "view_posts"29 unmodified linesdef responsenew(data):print(data)# contxxt = f"""# """# response = palm.chat( messages=data)intent = palm.chat(context = contx,messages=f"""Identify the user's intent from text_data below:\nArguments: text_data = {data}\n\nReturn the intent as one-word string representing the user's intent, as mentioned below:* if intent = viewing user's notes return = "view_notes"* if intent = viewing user's posts return = "view_posts"* if intent = viewing user's shared notes return = "view_shared_notes"* if intent = viewing user's todo lists return = "view_todo_lists"* if intent = viewing user's shared todo lists return = "view_shared_todo_lists"* if intent = viewing user's shared routines return = "view_shared_routines"* if intent = creating a goal return = "create_goal"* if intent = creating a reminder return = "create_reminder"* if intent = creating a routine return = "create_routine"* if intent = creating a group return = "create_group"* if intent = creating a community return = "create_community"* if intent = creating a note return = "create_note"* if intent = creating a post return = "create_post"* if intent = creating a todo list return = "create_todo_list"* if intent = sharing a reminder return = "share_reminder"* if intent = sharing a routine return = "share_routine"* if intent = sharing a group return = "share_group"* if intent = sharing a todo list return = "share_todo_list"* if intent = sharing a note return = "share_note"* if intent = what is your name or who are you return = "cosmo_name"""",)
app.py+51-39