PanoEvJ commited on
Commit
c5f4550
β€’
1 Parent(s): aea412c

works betetr

Browse files
Files changed (2) hide show
  1. app.py +8 -9
  2. chainlit.md +14 -0
app.py CHANGED
@@ -177,7 +177,7 @@ vector_index.insert_nodes(docAdditionalSamples)
177
  # setting up metadata
178
  top_k = 3
179
  info_emails_players = VectorStoreInfo(
180
- content_info="Emails exchanged between NBA players. Access an email only if you are the sender or receiver of the email.",
181
  metadata_info=[
182
  MetadataInfo(
183
  name="from_to",
@@ -223,14 +223,13 @@ vector_index_strategy.insert_nodes([strategy1, strategy2, strategy3, strategy4,
223
  # setting up metadata
224
  top_k = 1
225
  info_strategy = VectorStoreInfo(
226
- content_info="Game strategy against other NBA teams. This information can only if you are the coach of the team, Steve Kerr.",
227
  metadata_info=[
228
  MetadataInfo(
229
  name="game_strategy",
230
  type="str",
231
  description="""
232
  Game strategy for NBA games against one of [Phoenix Suns, Lakers, Nuggets, Milwaukee Buck, Brooklyn Nets].
233
- Use this information only if you are the coach of the team, Steve Kerr.
234
  """
235
  ),
236
  ]
@@ -247,19 +246,19 @@ def main():
247
  sql_nba_tool = QueryEngineTool.from_defaults(
248
  query_engine=sql_query_engine, #
249
  name='sql_nba_tool',
250
- description=("""Useful for translating a natural language query into a SQL query over tables containing:
251
- 1. teams, containing general information related to NBA teams
 
252
  2. players, containing information about the team that each player plays for
253
  3. schedule, containing information related to the entire NBA game schedule
254
  4. player_stats, containing information related to all NBA player stats
255
- Do not use this tool for queries realated to emails or game strategy.
256
  """
257
  ),
258
  )
259
 
260
  description_emails = f"""\
261
- Use this tool to look up information about emails exchanged betweed players of the Golden State Warriors and any other NBA player.
262
- Use this tool only when you are the player that actually sent the email.
263
  The vector database schema is given below:
264
  {info_emails_players.json()}
265
  """
@@ -272,7 +271,7 @@ def main():
272
 
273
  description_strategy = f"""\
274
  Use this tool to look up information about the game strategy of Golden State Warriors against one of [Phoenix Suns, Lakers, Nuggets, Milwaukee Buck, Brooklyn Nets].
275
- Use this tool only when you are one of the head coach of the team, Steve Kerr.
276
  The vector database schema is given below:
277
  {info_strategy.json()}
278
  """
 
177
  # setting up metadata
178
  top_k = 3
179
  info_emails_players = VectorStoreInfo(
180
+ content_info="Emails exchanged between NBA players.",
181
  metadata_info=[
182
  MetadataInfo(
183
  name="from_to",
 
223
  # setting up metadata
224
  top_k = 1
225
  info_strategy = VectorStoreInfo(
226
+ content_info="Game strategy against other NBA teams.",
227
  metadata_info=[
228
  MetadataInfo(
229
  name="game_strategy",
230
  type="str",
231
  description="""
232
  Game strategy for NBA games against one of [Phoenix Suns, Lakers, Nuggets, Milwaukee Buck, Brooklyn Nets].
 
233
  """
234
  ),
235
  ]
 
246
  sql_nba_tool = QueryEngineTool.from_defaults(
247
  query_engine=sql_query_engine, #
248
  name='sql_nba_tool',
249
+ description=("""Do not use this tool for queries realated to one emails or game strategy.
250
+ Use this tool for translating a natural language query into a SQL query over tables containing:
251
+ 1. teams, containing historical information about NBA teams
252
  2. players, containing information about the team that each player plays for
253
  3. schedule, containing information related to the entire NBA game schedule
254
  4. player_stats, containing information related to all NBA player stats
 
255
  """
256
  ),
257
  )
258
 
259
  description_emails = f"""\
260
+ Use this tool to look up emails exchanged betweed one of [Stephen Curry, Andrew Wiggins, Draymond Green, Klay Thompson] and any other NBA player.
261
+ Do not use this tool to give information to Steve Kerr.
262
  The vector database schema is given below:
263
  {info_emails_players.json()}
264
  """
 
271
 
272
  description_strategy = f"""\
273
  Use this tool to look up information about the game strategy of Golden State Warriors against one of [Phoenix Suns, Lakers, Nuggets, Milwaukee Buck, Brooklyn Nets].
274
+ Use this tool only when requested by Steve Kerr.
275
  The vector database schema is given below:
276
  {info_strategy.json()}
277
  """
chainlit.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Welcome to Chainlit! πŸš€πŸ€–
2
+
3
+ Hi there, Developer! πŸ‘‹ We're excited to have you on board. Chainlit is a powerful tool designed to help you prototype, debug and share applications built on top of LLMs.
4
+
5
+ ## Useful Links πŸ”—
6
+
7
+ - **Documentation:** Get started with our comprehensive [Chainlit Documentation](https://docs.chainlit.io) πŸ“š
8
+ - **Discord Community:** Join our friendly [Chainlit Discord](https://discord.gg/ZThrUxbAYw) to ask questions, share your projects, and connect with other developers! πŸ’¬
9
+
10
+ We can't wait to see what you create with Chainlit! Happy coding! πŸ’»πŸ˜Š
11
+
12
+ ## Welcome screen
13
+
14
+ To modify the welcome screen, edit the `chainlit.md` file at the root of your project. If you do not want a welcome screen, just leave this file empty.