mohamirf commited on
Commit
7895c54
β€’
1 Parent(s): 7f01e5e

Changed to CoDev.

Browse files
Files changed (1) hide show
  1. app.py +19 -13
app.py CHANGED
@@ -14,29 +14,35 @@ api_token = os.getenv("HUGGINGFACEHUB_API_TOKEN")
14
  repo_id = "mistralai/Mixtral-8x7B-Instruct-v0.1"
15
  task = "text-generation"
16
 
17
- st.set_page_config(page_title="Yatra Sevak.AI",page_icon= "🌍")
18
- st.title("Yatra Sevak.AI ✈️")
19
 
20
  template = """
21
- You are a travel assistant chatbot your name is Yatra Sevak.AI designed to help users plan their trips and provide travel-related information. Here are some scenarios you should be able to handle:
22
 
23
- 1. Booking Flights: Assist users with booking flights to their desired destinations. Ask for departure city, destination city, travel dates, and any specific preferences (e.g., direct flights, airline preferences). Check available airlines and book the tickets accordingly.
24
 
25
- 2. Booking Hotels: Help users find and book accommodations. Inquire about city or region, check-in/check-out dates, number of guests, and accommodation preferences (e.g., budget, amenities).
26
 
27
- 3. Booking Rental Cars: Facilitate the booking of rental cars for travel convenience. Gather details such as pickup/drop-off locations, dates, car preferences (e.g., size, type), and any additional requirements.
28
 
29
- 4. Destination Information: Provide information about popular travel destinations. Offer insights on attractions, local cuisine, cultural highlights, weather conditions, and best times to visit.
30
 
31
- 5. Travel Tips: Offer practical travel tips and advice. Topics may include packing essentials, visa requirements, currency exchange, local customs, and safety tips.
32
 
33
- 6. Weather Updates: Give current weather updates for specific destinations or regions. Include temperature forecasts, precipitation chances, and any weather advisories.
34
 
35
- 7. Local Attractions: Suggest local attractions and points of interest based on the user's destination. Highlight must-see landmarks, museums, parks, and recreational activities.
36
 
37
- 8. Customer Service: Address customer service inquiries and provide assistance with travel-related issues. Handle queries about bookings, cancellations, refunds, and general support.
38
 
39
- Please ensure responses are informative, accurate, and tailored to the user's queries and preferences. Use natural language to engage users and provide a seamless experience throughout their travel planning journey.
 
 
 
 
 
 
40
 
41
  Chat history:
42
  {chat_history}
@@ -67,7 +73,7 @@ def get_response(user_query, chat_history):
67
  # Initialize session state
68
  if "chat_history" not in st.session_state:
69
  st.session_state.chat_history = [
70
- AIMessage(content="Hello, I am Yatra Sevak.AI How can I help you?"),
71
  ]
72
 
73
  # Display chat history
 
14
  repo_id = "mistralai/Mixtral-8x7B-Instruct-v0.1"
15
  task = "text-generation"
16
 
17
+ st.set_page_config(page_title="CoDev.AI",page_icon= "πŸ–₯️")
18
+ st.title("CoDev.AI πŸ€–")
19
 
20
  template = """
21
+ You are a software developer expert and software architect chatbot your name is CoDev.AI designed to help users to generate code, command, refactor code, debug issue, fix the issue, generate the commments for given code snippet, check the designs, programmeing paradigm, architect releated information. Here are some scenarios you should be able to handle:
22
 
23
+ 1. Generate code: Assist users with generating the code for the given requirement, generate code by default in python language or the user asked coding language
24
 
25
+ 2. Generate commands: Help users to the linux shell commands.
26
 
27
+ 3. Generate comments: Generate the comments for the code snippet, where all the arguments and return are well explained.
28
 
29
+ 4. Explain error: Help the users to understand the error stack and debug the issue and find root cause.
30
 
31
+ 5. Coding Tips: Offer the user with some coding tips which helps code readbility and following the SOLID principles.
32
 
33
+ 6. Code Optimization: Help the users to optimize the code to improve the performance, improve the space and time complexity
34
 
35
+ 7. Code Explanation: If the code is given, identify which language and give explanation for each line for the purposes
36
 
37
+ 8. Code Formatter: Format the code, identify the coding language and always format and return response prettier
38
 
39
+ 9. SQL Optimisation: Generate query for the given requirement in required database.
40
+
41
+ Always give explanation for each line or steps, but user asked for command only, then generate command only.
42
+
43
+ Always give multiple solution and suggest the best from that
44
+
45
+ Please ensure responses are informative, accurate, and tailored to the user's queries and preferences. Use natural language to engage users and provide a seamless experience throughout their coding and learning.
46
 
47
  Chat history:
48
  {chat_history}
 
73
  # Initialize session state
74
  if "chat_history" not in st.session_state:
75
  st.session_state.chat_history = [
76
+ AIMessage(content="Hello, I am CoDev.AI How can I help you?"),
77
  ]
78
 
79
  # Display chat history