[Improvements] update docs (#1079)

Co-authored-by: Deven Patel <deven298@yahoo.com>
This commit is contained in:
Deven Patel
2023-12-30 13:39:38 +05:30
committed by GitHub
parent 9e2b232c13
commit a7e1520d08
3 changed files with 74 additions and 14 deletions

View File

@@ -53,24 +53,39 @@ print(sources)
# [
# (
# 'Elon Musk PROFILEElon MuskCEO, Tesla$247.1B$2.3B (0.96%)Real Time Net Worthas of 12/7/23 ...',
# {'url': 'https://www.forbes.com/profile/elon-musk', ...}
# {
# 'url': 'https://www.forbes.com/profile/elon-musk',
# 'score': 0.89,
# ...
# }
# ),
# (
# '74% of the company, which is now called X.Wealth HistoryHOVER TO REVEAL NET WORTH BY YEARForbes ...',
# {'url': 'https://www.forbes.com/profile/elon-musk', ...}
# {
# 'url': 'https://www.forbes.com/profile/elon-musk',
# 'score': 0.81,
# ...
# }
# ),
# (
# 'founded in 2002, is worth nearly $150 billion after a $750 million tender offer in June 2023 ...',
# {'url': 'https://www.forbes.com/profile/elon-musk', ...}
# {
# 'url': 'https://www.forbes.com/profile/elon-musk',
# 'score': 0.73,
# ...
# }
# )
# ]
```
<Note>
When `citations=True`, note that the returned `sources` are a list of tuples where each tuple has three elements (in the following order):
When `citations=True`, note that the returned `sources` are a list of tuples where each tuple has two elements (in the following order):
1. source chunk
2. link of the source document
3. document id (used for book keeping purposes)
2. dictionary with metadata about the source chunk
- `url`: url of the source
- `doc_id`: document id (used for book keeping purposes)
- `score`: score of the source chunk with respect to the question
- other metadata you might have added at the time of adding the source
</Note>

View File

@@ -53,24 +53,39 @@ print(sources)
# [
# (
# 'Elon Musk PROFILEElon MuskCEO, Tesla$247.1B$2.3B (0.96%)Real Time Net Worthas of 12/7/23 ...',
# {'url': 'https://www.forbes.com/profile/elon-musk', ...}
# {
# 'url': 'https://www.forbes.com/profile/elon-musk',
# 'score': 0.89,
# ...
# }
# ),
# (
# '74% of the company, which is now called X.Wealth HistoryHOVER TO REVEAL NET WORTH BY YEARForbes ...',
# {'url': 'https://www.forbes.com/profile/elon-musk', ...}
# {
# 'url': 'https://www.forbes.com/profile/elon-musk',
# 'score': 0.81,
# ...
# }
# ),
# (
# 'founded in 2002, is worth nearly $150 billion after a $750 million tender offer in June 2023 ...',
# {'url': 'https://www.forbes.com/profile/elon-musk', ...}
# {
# 'url': 'https://www.forbes.com/profile/elon-musk',
# 'score': 0.73,
# ...
# }
# )
# ]
```
<Note>
When `citations=True`, note that the returned `sources` are a list of tuples where each tuple has three elements (in the following order):
When `citations=True`, note that the returned `sources` are a list of tuples where each tuple has two elements (in the following order):
1. source chunk
2. link of the source document
3. document id (used for book keeping purposes)
2. dictionary with metadata about the source chunk
- `url`: url of the source
- `doc_id`: document id (used for book keeping purposes)
- `score`: score of the source chunk with respect to the question
- other metadata you might have added at the time of adding the source
</Note>
### Without citations