diff --git a/team-152/Pitch Deck Marhaba Morocco.pdf b/team-152/Pitch Deck Marhaba Morocco.pdf new file mode 100644 index 000000000..d3b8eebea Binary files /dev/null and b/team-152/Pitch Deck Marhaba Morocco.pdf differ diff --git a/team-152/README.md b/team-152/README.md new file mode 100644 index 000000000..737c79c1d --- /dev/null +++ b/team-152/README.md @@ -0,0 +1,76 @@ +# Hackathon + + +- Demo Link of the Marhaba-Morocco app [Marhaba-Morocco-app](https://marhaba-morocco.streamlit.app/) +- Figma design of the Marhaba-Morocco [Marhaba-Morocco-design](https://www.figma.com/design/e2Th6xQ4EvAaYwoPeHBzeN/Marhaba-Morocco?node-id=154-15406&t=giX5iXYplDUsToEY-1) +- Watch the video presentation of the Marhaba-Morocco app [video-presentation](https://drive.google.com/file/d/1eGzoz7EJ2z6cKwwEHQv68WUKnWRmE1mN/view?usp=sharing). +- Watch the video demo of the Marhaba-Morocco app [video-demo](https://drive.google.com/file/d/1P2S0oJvJQAcTiU3ctTCJRs2uIA5ngP43/view?usp=sharing). + + + +## Abstract + +### Background and Problem Statement + +In today's fast-paced world, travelers often face challenges in finding reliable information about accommodations, local laws, cultural insights, and trip planning in Morocco. This project aims to streamline the process of gathering and providing this information, making it easier for users to plan their trips effectively. + +### Impact and Proposed Solution + +The proposed solution is a virtual concierge application that leverages AI to assist users in obtaining tailored recommendations for hotels, cultural insights, and legal information. By integrating various APIs and utilizing natural language processing, the application can provide accurate and relevant responses to user queries, enhancing the travel experience and ensuring users have access to the information they need. + +### Project Outcomes and Deliverables + +- A fully functional virtual concierge application that can: + - Provide hotel recommendations based on user preferences. + - Answer questions related to Moroccan culture and traditions. + - Offer insights into local laws and regulations. +- Clear documentation on how to use the application. +- A user-friendly interface built with Streamlit for easy interaction. + +## Instructions + +1. **Clone the Repository** + + ```bash + git clone + cd + ``` + +2. **Set Up Environment** + + - Ensure you have Python 3.8 or higher installed. + - Create a virtual environment: + ```bash + python -m venv venv + source venv/bin/activate # On Windows use `venv\Scripts\activate` + ``` + +3. **Install Dependencies** + + - Install the required libraries: + ```bash + pip install -r requirements.txt + ``` + +4. **Set Up Environment Variables** + + - Create a `.env` file in the root directory and add your API keys: + ``` + OPENAI_API_KEY= + PINECONE_API_KEY= + HOTELS_API_KEY= + ``` + +5. **Run the Application** + + - Start the Streamlit application: + ```bash + streamlit run main.py + ``` + +6. **Interact with the Application** + - Open your web browser and go to `http://localhost:8501` to start using the virtual concierge. + +## Video Demo + +- Watch the video demo of the Marhaba-Morocco app [here](https://drive.google.com/file/d/1P2S0oJvJQAcTiU3ctTCJRs2uIA5ngP43/view?usp=sharing). diff --git a/team-152/__pycache__/culture.cpython-313.pyc b/team-152/__pycache__/culture.cpython-313.pyc new file mode 100644 index 000000000..fd13d0ec1 Binary files /dev/null and b/team-152/__pycache__/culture.cpython-313.pyc differ diff --git a/team-152/__pycache__/dispatcher.cpython-313.pyc b/team-152/__pycache__/dispatcher.cpython-313.pyc new file mode 100644 index 000000000..6e945d535 Binary files /dev/null and b/team-152/__pycache__/dispatcher.cpython-313.pyc differ diff --git a/team-152/__pycache__/hotels.cpython-313.pyc b/team-152/__pycache__/hotels.cpython-313.pyc new file mode 100644 index 000000000..842a2eded Binary files /dev/null and b/team-152/__pycache__/hotels.cpython-313.pyc differ diff --git a/team-152/__pycache__/law.cpython-313.pyc b/team-152/__pycache__/law.cpython-313.pyc new file mode 100644 index 000000000..0d67aa698 Binary files /dev/null and b/team-152/__pycache__/law.cpython-313.pyc differ diff --git a/team-152/culture.py b/team-152/culture.py new file mode 100644 index 000000000..248c0149c --- /dev/null +++ b/team-152/culture.py @@ -0,0 +1,106 @@ +import os +from openai import OpenAI +from dotenv import load_dotenv +from datetime import date, datetime +import requests +import json + +class Culture: + def __init__(self): + + load_dotenv() + self.hotelsKey = os.environ["HOTELS_API_KEY"] + + self.system_prompt = """ + You are a well-informed virtual concierge specializing in Moroccan tourism. With a deep understanding of the region's attractions, culture, and hospitality, you are dedicated to helping travelers get exactly what they need. Your skill lies in accurately interpreting user requests and efficiently assigning them to the correct process. + + Your task is to help users find specific information related to Moroccan culture, including but not limited to food, music, history, festivals, art, and traditions. If the user is asking about Moroccan culture, your goal is to: + + 1. Analyze the user's input to understand what aspect of Moroccan culture they are interested in (e.g., food, music, festivals, history, art). + 2. Extract the relevant keywords or phrases from the user's query that will help in conducting a Google search for information about Moroccan culture. + 3. Refactor these keywords or phrases into a format suitable for a Google search query, where the keywords are space-separated. + + Instructions: + - If the user asks about a specific aspect of Moroccan culture (e.g., "Tell me about Moroccan food" or "What are the popular Moroccan festivals?"), extract keywords such as "food" or "festivals" and format them for a Google search. + - If the user's query is unclear, politely ask them to specify what aspect of Moroccan culture they would like to know more about. + - If the user's request is not related to Moroccan culture, respond according to the normal flow of the concierge process (hotel recommendations, trip planning, local laws, etc.). + + Example 1: + User Input: "Tell me about the food in Morocco" + Output: "food Moroccan cuisine traditional Moroccan dishes" + + Example 2: + User Input: "What are some popular Moroccan festivals?" + Output: "festivals Moroccan festivals celebrations" + + Your response should be a single string of space-separated keywords, ready to be used in a Google search query. + """ + self.client = OpenAI() + + def refactor(self,prompt): + + completion = self.client.chat.completions.create( + model="gpt-4o-mini", # Use GPT-4 or gpt-3.5-turbo + messages=[ + {"role": "system", "content": self.system_prompt}, + {"role": "user", "content": str(prompt)} + ], + temperature=0.5 # Set to 0 for deterministic responses + ) + return str(completion.choices[0].message.content) + + def search_api(self,search): + print(search) + url = "https://searx-search-api.p.rapidapi.com/search" + + data = {"q":search,"format":"json"} + + headers = { + "x-rapidapi-key": self.hotelsKey, + "x-rapidapi-host": "searx-search-api.p.rapidapi.com" + } + + response = requests.get(url, headers=headers, params=data) + print(response) + return response.json()["results"] + + def response(self,prompt,data,msg_hist): + system = f""" + You are a well-informed virtual concierge specializing in Moroccan tourism. Your role is to assist travelers by providing relevant, concise, and accurate information based on their queries. + + Your task: + - You have been provided with data retrieved from an API related to Moroccan tourism (e.g., hotel information, cultural insights, or festival details). + - You must analyze the data, interpret it, and generate a polite, clear, and informative response to the user based on the details available. + - The response should be formatted in a conversational manner, addressing the user's query directly using the information from the data. + + prompt: + ``` + {prompt} + ``` + Data: + ``` + {data} + ``` + Your output should: + - Be clear and helpful, summarizing the key points from the data. + - Provide any relevant details directly related to the user's query. + - Avoid including raw data or irrelevant details. Focus on what the user would find most useful based on their request. + + Example 1: + User Input: "Tell me about the hotels in Marrakesh." + Data: "Hotel A: 4 stars, $100 per night, near Jemaa el-Fnaa, free Wi-Fi. Hotel B: 5 stars, $200 per night, with pool, located in the medina." + Response: "In Marrakesh, you can find several great hotels. For a budget-friendly option, Hotel A offers a 4-star experience with free Wi-Fi and is conveniently located near Jemaa el-Fnaa for just $100 per night. If you're looking for something more luxurious, Hotel B is a 5-star property with a pool and is located in the medina, priced at $200 per night." + + Please ensure that the response is well-structured and helpful to the user, incorporating the relevant data appropriately. + """ + + msg_hist_tmp = list(msg_hist) + msg_hist_tmp.insert(0, {"role": "system", "content": prompt}) + + completion = self.client.chat.completions.create( + model="gpt-4o-mini", # Use GPT-4 or gpt-3.5-turbo + messages=msg_hist_tmp, + temperature=0.7 # Set to 0 for deterministic responses + ) + + return str(completion.choices[0].message.content) \ No newline at end of file diff --git a/team-152/dispatcher.py b/team-152/dispatcher.py new file mode 100644 index 000000000..c6879351a --- /dev/null +++ b/team-152/dispatcher.py @@ -0,0 +1,103 @@ +import os +from openai import OpenAI +from dotenv import load_dotenv + +class Dispatcher(): + + def __init__(self): + + load_dotenv() + self.openAiKey = os.environ["OPENAI_API_KEY"] + + self.system_prompt = """ + backstory: + You are a well-informed virtual concierge specializing in Moroccan tourism. + With a deep understanding of the region's attractions, culture, and hospitality, + you are dedicated to helping travelers get exactly what they need. Your skill + lies in accurately interpreting user requests and efficiently assigning them + to the correct process. + + goal: + Analyze user input to determine whether they need hotel recommendations, + cultural Q&A, or a full trip plan, and forward the request accordingly. + + role: + Tourism Request Dispatcher return only one of those `hotels` , `local_law_qna` , `cultural_qna`, `trip_plan` , `none` + + task: + Based on the user's input, determine their request type + Return only one of those `hotels` , `local_law_qna` , `cultural_qna`, `trip_plan` , `none` + """ + self.client = OpenAI() + + def run(self,prompt,msg_hist): + # Call the OpenAI API with the new interface + msg_hist_tmp = list(msg_hist) + # msg_hist_tmp.insert(0, {"role": "system", "content": self.system_prompt}) + print(msg_hist_tmp) + completion = self.client.chat.completions.create( + model="gpt-4o-mini", # Use GPT-4 or gpt-3.5-turbo + messages=[{"role": "system", "content": self.system_prompt}]+msg_hist_tmp, + temperature=0 # Set to 0 for deterministic responses + ) + output = completion.choices[0].message.content + print(output) + if str(output) in ["hotels","local_law_qna","cultural_qna","trip_plan"]: + + return output + else: + return "none" + + def welcome_msg(self): + prompt = """ + Backstory: + You are a knowledgeable virtual concierge with expertise in Moroccan tourism. + You excel at understanding user needs and guiding them toward the best solutions, whether it's accommodations, cultural insights, or full trip planning. + + Your role: + Craft a warm and inviting welcome message that starts with 'Marhaba in Morocco!' + + Requirements: + - Begin with 'Marhaba in Morocco!' + - Make the message engaging and slightly different from: + 'Marhaba in Morocco! How can I assist you today—hotels, culture, trip planning, or local laws?' + - Be a bit creative and keep the tone friendly and helpful. + - maximum 30 words + """ + completion = self.client.chat.completions.create( + model="gpt-4o-mini", # Use GPT-4 or gpt-3.5-turbo + messages=[ + {"role": "system", "content": prompt}, + {"role": "user", "content": "Hi"} + ], + temperature=0.6 # Set to 0 for deterministic responses + ) + return str(completion.choices[0].message.content) + + def retry_msg(self,msg_hist): + prompt = """ + Backstory: + You are a knowledgeable virtual concierge with expertise in Moroccan tourism. + Your primary role is to help users by accurately interpreting their requests and guiding them to the right resources, whether it’s accommodations, cultural insights, trip planning, or local laws. + + Context: + The user has provided an unclear or unhelpful response and has not specified their needs. + don't answer to any question that doesn't fit to your role. + + Task: + Generate a polite and encouraging message prompting the user to clarify their request. + + Requirements: + - Be clear and concise. + - Gently ask the user to specify their interest. + - Example: 'To assist you better, please let me know your focus: hotels, culture, trip planning, or local laws?' + """ + + msg_hist_tmp = list(msg_hist) + msg_hist_tmp.insert(0, {"role": "system", "content": prompt}) + completion = self.client.chat.completions.create( + model="gpt-4o-mini", # Use GPT-4 or gpt-3.5-turbo + messages=msg_hist_tmp, + temperature=0.6 # Set to 0 for deterministic responses + ) + return str(completion.choices[0].message.content) diff --git a/team-152/hotels.py b/team-152/hotels.py new file mode 100644 index 000000000..792058524 --- /dev/null +++ b/team-152/hotels.py @@ -0,0 +1,158 @@ +import os +from openai import OpenAI +from dotenv import load_dotenv +from datetime import date, datetime +import requests +import json + +class Hotels: + def __init__(self): + + load_dotenv() + self.openAiKey = os.environ["OPENAI_API_KEY"] + self.hotelsKey = os.environ["HOTELS_API_KEY"] + self.system_prompt = (""" + You are an assistant that gathers information to recommend hotels in Morocco. + You must collect the following details from the user and generate a structured JSON object without any additional text or explanation. The current date is """ + + datetime.now().date().strftime("%B %d, %Y") + """. + + Details to Collect: + - adults_number (required) + - children_number (optional) + - checkin_date (required, format: yyyy-mm-dd) + - checkout_date (required, format: yyyy-mm-dd) + - locale (required, default: "en-gb" if not provided) + - room_number (required) + - filter_by_currency (required, default: "MAD" if not provided) + - latitude and longitude (required, derived from the Moroccan city or region provided by the user) + - units (required, default: "metric" if not provided) + - order_by (required, default: "popularity" if not provided) + + Notes: + - If any required field is missing, change his value to null. + + Moroccan Locations Only: + - If the user mentions a location, determine if it is valid within Morocco. + - Convert valid locations into their respective latitude and longitude using a predefined mapping. + + Output: + - don't respond with any text or explanations. + - respond with a JSON object containing all the gathered fields and nothing else. + + + Example Output: + { + "adults_number": 2, + "children_number": 1, + "checkin_date": "2024-12-05", + "checkout_date": "2024-12-10", + "locale": "en-gb", + "room_number": 1, + "filter_by_currency": "MAD", + "latitude": 31.6295, + "longitude": -7.9811, + "units": "metric", + "order_by": "popularity" + } + """) + self.client = OpenAI() + + def run(self,prompt,prompts): + + completion = self.client.chat.completions.create( + model="gpt-4o-mini", # Use GPT-4 or gpt-3.5-turbo + messages=[ + {"role": "system", "content": self.system_prompt}, + {"role": "user", "content": str(prompts)} + ], + temperature=0 # Set to 0 for deterministic responses + ) + return str(completion.choices[0].message.content) + + def missing_required(self,missing,msg_hist): + + prompt = f""" + You are an assistant that gathers information to recommend hotels in Morocco. + You must collect the following details from the user and generate a structured JSON object without any additional text or explanation. The current date is + {datetime.now().date().strftime("%B %d, %Y")}. + + Details to Collect: + - adults_number (required) + - children_number (optional) + - checkin_date (required, format: yyyy-mm-dd) + - checkout_date (required, format: yyyy-mm-dd) + - locale (required, default: "en-gb" if not provided) + - room_number (required) + - filter_by_currency (required, default: "MAD" if not provided) + - latitude and longitude (required, derived from the Moroccan city or region provided by the user) + - units (required, default: "metric" if not provided) + - order_by (required, default: "popularity" if not provided) + + Note: + - The user did not provide the following required fields: {str(missing)}. + - Ask for the budget even if it will not be in the output. + + Goal: + - Generate a polite and clear message asking the user to provide information for the missing fields. + - Ensure the message is helpful and concise, and guide the user to provide the required details. + - Example: "To assist you better, could you please provide me with the check in and check out date ?" + + Your response should contain only the message to the user, with no additional explanation or content. + Don't provide the exact missing fields name or format. + """ + + msg_hist_tmp = list(msg_hist) + msg_hist_tmp.insert(0, {"role": "system", "content": prompt}) + + completion = self.client.chat.completions.create( + model="gpt-4o-mini", # Use GPT-4 or gpt-3.5-turbo + messages=msg_hist_tmp, + temperature=0.7 # Set to 0 for deterministic responses + ) + return str(completion.choices[0].message.content) + + def hotels_api(self,data): + url = "https://booking-com.p.rapidapi.com/v1/hotels/search-by-coordinates" + + cleaned_data = {key: value for key, value in data.items() if value is not None} + + headers = { + "x-rapidapi-key": self.hotelsKey, + "x-rapidapi-host": "booking-com.p.rapidapi.com" + } + + response = requests.get(url, headers=headers, params=cleaned_data) + + print(response) + print(response.json()["result"]) + print(json.dumps(response.json()["result"])) + + hotels = response.json()["result"] + + return hotels + + def results(self,hotels,msg_hist): + prompt = f""" + Based on all the user conditions, consult the hotels the choose 4 hotels based on the user conditions. + ``` + hotels: + {hotels} + ``` + + you need to print a table with these columns: + `image,name,address,price,link` + + and you have to help the user choose the hotel. + + """ + + msg_hist_tmp = list(msg_hist) + msg_hist_tmp.insert(0, {"role": "system", "content": prompt}) + + completion = self.client.chat.completions.create( + model="gpt-4o-mini", # Use GPT-4 or gpt-3.5-turbo + messages=msg_hist_tmp, + temperature=0.7 # Set to 0 for deterministic responses + ) + return str(completion.choices[0].message.content) + diff --git a/team-152/law.py b/team-152/law.py new file mode 100644 index 000000000..6c3fa35a2 --- /dev/null +++ b/team-152/law.py @@ -0,0 +1,70 @@ +from langchain.chains.question_answering import load_qa_chain +from langchain_community.vectorstores import Pinecone +import os +from dotenv import load_dotenv +from langchain_community.llms import OpenAI +from pinecone import Pinecone, ServerlessSpec +from langchain_community.vectorstores import Pinecone as LangChainPinecone +from langchain_openai import OpenAIEmbeddings +from langchain_community.chat_models import ChatOpenAI + + +class Law: + def __init__(self): + # Load environment variables + load_dotenv() + + # Initialize Pinecone + self.pc = Pinecone( + api_key=os.environ.get("PINECONE_API_KEY") + ) + + self.index_name = 'low2' + # Connect to the index + self.index = self.pc.Index(self.index_name) + + # Set up embeddings + self.openAiKey = os.environ["OPENAI_API_KEY"] + self.embeddings = OpenAIEmbeddings(openai_api_key=self.openAiKey) + + # LangChain Pinecone wrapper + self.book_docsearch = LangChainPinecone( + index=self.index, + embedding=self.embeddings, + text_key="text" # Ensure documents use this key for storing text + ) + + # LLM setup + self.llm = ChatOpenAI(model_name="gpt-4", temperature=0.3, openai_api_key=self.openAiKey) + + def getLaw(self, prompt, chat_hist): + # Prompt templates + from langchain.prompts import SystemMessagePromptTemplate, HumanMessagePromptTemplate, ChatPromptTemplate + + template = """ + You are a knowledgeable legal assistant specializing in providing accurate and concise information about laws and legal frameworks. Your role is to assist users by interpreting their queries, offering reliable legal insights, and guiding them to the most relevant legal resources or concepts. You do not offer legal advice but provide general information and clarifications based on the user's questions. + + Your communication style is professional, clear, and neutral. Respond using appropriate legal terminology and explain concepts in a way that is easy to understand. If additional details are needed to address the query, ask specific and targeted follow-up questions. + + Focus on delivering precise and relevant responses, ensuring the user understands the legal principles or frameworks related to their inquiry. + + {document} + + Here is the chat history: + """ + str(chat_hist) + """ + """ + docs = self.book_docsearch.similarity_search(prompt) + + # LLM chain + llm = OpenAI(temperature=0.3, openai_api_key=self.openAiKey) + chain = load_qa_chain(llm, chain_type="stuff") + # Perform similarity search + + + # Run the chain with the required inputs + response = chain.run( + input_documents= docs, # Pass the combined document text + question= prompt # Pass the user query + ) + + return response \ No newline at end of file diff --git a/team-152/lawEmbedding.ipynb b/team-152/lawEmbedding.ipynb new file mode 100644 index 000000000..65aec6f2b --- /dev/null +++ b/team-152/lawEmbedding.ipynb @@ -0,0 +1,23 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/team-152/main.py b/team-152/main.py new file mode 100644 index 000000000..3a61677ca --- /dev/null +++ b/team-152/main.py @@ -0,0 +1,114 @@ +import streamlit as st +from culture import Culture +from dispatcher import Dispatcher +from hotels import Hotels +import json +from law import Law + +def write_msg(type,msg): + with st.chat_message(type): + st.write(msg) + st.session_state.messages.append({"role":type, "content": msg}) + if type == "user": + st.session_state.messages_req.append({"role": type, "content": msg}) + + +prompt = st.chat_input("Say something") + +if "messages" not in st.session_state: + st.session_state.messages = [] + st.session_state.messages_req = [] + st.session_state.hotel_prompts = [] + st.session_state.culture_prompts = [] + st.session_state.law_prompts = [] + st.session_state.dispatcher = Dispatcher() + st.session_state.hotels = Hotels() + st.session_state.culture = Culture() + st.session_state.law = Law() + st.session_state.messages.append({"role":"assistant", "content": st.session_state.dispatcher.welcome_msg()}) + +for message in st.session_state.messages: + with st.chat_message(message["role"]): + st.markdown(message["content"]) + +if prompt: + write_msg("user",prompt) + output = st.session_state.dispatcher.run(prompt,st.session_state.messages_req) + + if output == "none": + print("NOOONE") + write_msg("assistant", st.session_state.dispatcher.retry_msg(st.session_state.messages)) + elif output == "hotels": + print("HOTELS") + st.session_state.hotel_prompts.append({"role":"user", "content":prompt}) + json_string = st.session_state.hotels.run(prompt, st.session_state.hotel_prompts) + + print(json_string) + + json_object = json.loads(json_string) + required_fields = ["adults_number", "checkin_date", "checkout_date", "locale", "room_number", "filter_by_currency", "latitude", "longitude", "units", "order_by"] + optional_fields = ["children_number"] + + missing_fields = [] + # Check for missing fields + for field in required_fields: + if field not in json_object or json_object[field] == "" or json_object[field] is None: + missing_fields.append(field) + + missing_fields_opt = [] + # Check for missing fields + for field in optional_fields: + if field not in json_object or json_object[field] == "" or json_object[field] is None: + missing_fields_opt.append(field) + + if len(missing_fields) != 0: + missing_fields.extend(missing_fields_opt) + write_msg("assistant",st.session_state.hotels.missing_required(missing_fields,st.session_state.messages)) + else: + hotels = st.session_state.hotels.hotels_api(json.loads(json_string)) + hotel_details = "" + for hotel in hotels: + hotel_details += f""" + Hotel: {hotel["hotel_name_trans"]} + Price: {hotel["price_breakdown"]["all_inclusive_price"]} + currency: {hotel["currencycode"]} + Booking link: {hotel['url']} + image_url: {hotel["main_photo_url"]} + Rating: {hotel["review_score_word"]} + Address: {hotel['address_trans']} + """ + + write_msg("assistant", st.session_state.hotels.results(hotel_details,st.session_state.messages)) + + elif output == "cultural_qna": + print("CULTURE") + response = st.session_state.culture.refactor(prompt) + + results = st.session_state.culture.search_api(response) + + search_details = "" + for result in results: + search_details += f""" + title: {result["title"]} + url: {result["url"]} + content: {result["content"]} + """ + resp = st.session_state.culture.response(prompt,search_details,st.session_state.culture_prompts) + + st.session_state.culture_prompts.append({"role": "user", "content": prompt}) + st.session_state.culture_prompts.append({"role": "assistant", "content": resp}) + write_msg("assistant", resp) + + elif output == "local_law_qna": + + print("LAAAAAW") + + resp = st.session_state.law.getLaw(prompt,st.session_state.law_prompts) + write_msg("assistant",resp) + st.session_state.law_prompts.append({"role": "user", "content": prompt}) + st.session_state.law_prompts.append({"role":"assistant","content":resp}) + + + else: + print("ELSE") + write_msg("assistant", st.session_state.dispatcher.retry_msg(st.session_state.messages)) \ No newline at end of file diff --git a/team-152/requirements.txt b/team-152/requirements.txt new file mode 100644 index 000000000..5e7c41f5a --- /dev/null +++ b/team-152/requirements.txt @@ -0,0 +1,83 @@ +aiohappyeyeballs==2.4.4 +aiohttp==3.11.8 +aiosignal==1.3.1 +altair==5.5.0 +annotated-types==0.7.0 +anyio==4.6.2.post1 +attrs==24.2.0 +blinker==1.9.0 +cachetools==5.5.0 +certifi==2024.8.30 +charset-normalizer==3.4.0 +click==8.1.7 +dataclasses-json==0.6.7 +distro==1.9.0 +frozenlist==1.5.0 +gitdb==4.0.11 +GitPython==3.1.43 +h11==0.14.0 +httpcore==1.0.7 +httpx==0.28.0 +httpx-sse==0.4.0 +idna==3.10 +Jinja2==3.1.4 +jiter==0.8.0 +jsonpatch==1.33 +jsonpointer==3.0.0 +jsonschema==4.23.0 +jsonschema-specifications==2024.10.1 +langchain==0.3.9 +langchain-community==0.3.8 +langchain-core==0.3.21 +langchain-openai==0.2.10 +langchain-text-splitters==0.3.2 +langsmith==0.1.147 +markdown-it-py==3.0.0 +MarkupSafe==3.0.2 +marshmallow==3.23.1 +mdurl==0.1.2 +multidict==6.1.0 +mypy-extensions==1.0.0 +narwhals==1.15.1 +numpy==1.26.4 +openai==1.55.3 +orjson==3.10.12 +packaging==24.2 +pandas==2.2.3 +pillow==11.0.0 +pinecone==5.4.1 +pinecone-plugin-inference==3.0.0 +pinecone-plugin-interface==0.0.7 +propcache==0.2.1 +protobuf==5.29.0 +pyarrow==18.1.0 +pydantic==2.10.2 +pydantic-settings==2.6.1 +pydantic_core==2.27.1 +pydeck==0.9.1 +Pygments==2.18.0 +python-dateutil==2.9.0.post0 +python-dotenv==1.0.1 +pytz==2024.2 +PyYAML==6.0.2 +referencing==0.35.1 +regex==2024.11.6 +requests==2.32.3 +requests-toolbelt==1.0.0 +rich==13.9.4 +rpds-py==0.21.0 +six==1.16.0 +smmap==5.0.1 +sniffio==1.3.1 +SQLAlchemy==2.0.35 +streamlit==1.40.2 +tenacity==9.0.0 +tiktoken==0.8.0 +toml==0.10.2 +tornado==6.4.2 +tqdm==4.67.1 +typing-inspect==0.9.0 +typing_extensions==4.12.2 +tzdata==2024.2 +urllib3==2.2.3 +yarl==1.18.3