Skip to content

Commit cd9a3ce

Browse files
authored
docs: added github and discord links (#179)
1 parent 1c5f46a commit cd9a3ce

File tree

3 files changed

+66
-28
lines changed

3 files changed

+66
-28
lines changed

docs/concepts/metrics/faithfulness.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Faithfulness
1+
# Faithfulness
22

33
This measures the factual consistency of the generated answer against the given context. It is calculated from answer and retrieved context. The answer is scaled to (0,1) range. Higher the better.
44

@@ -21,7 +21,7 @@ The generated answer is regarded as faithful if all the claims that are made in
2121
```
2222

2323

24-
### Example
24+
## Example
2525

2626
```{code-block} python
2727
:caption: Faithfulness metric with batch size 10

docs/conf.py

Lines changed: 63 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,6 @@
1111
author = "ExplodingGradients"
1212
release = "0.0.16"
1313

14-
# enable extensions
15-
# https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#syntax-admonitions
16-
myst_enable_extensions = [
17-
"amsmath",
18-
"colon_fence",
19-
"deflist",
20-
"dollarmath",
21-
"fieldlist",
22-
"html_admonition",
23-
"html_image",
24-
"linkify",
25-
"replacements",
26-
"smartquotes",
27-
"strikethrough",
28-
"substitution",
29-
"tasklist",
30-
"attrs_block",
31-
]
3214

3315
# -- General configuration ---------------------------------------------------
3416
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@@ -49,18 +31,75 @@
4931
# -- Options for HTML output -------------------------------------------------
5032
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
5133

34+
# enable extensions
35+
# https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#syntax-admonitions
36+
myst_enable_extensions = [
37+
"amsmath",
38+
"colon_fence",
39+
"deflist",
40+
"dollarmath",
41+
"fieldlist",
42+
"html_admonition",
43+
"html_image",
44+
"linkify",
45+
"replacements",
46+
"smartquotes",
47+
"strikethrough",
48+
"substitution",
49+
"tasklist",
50+
# "attrs_block",
51+
]
52+
5253
html_title = "Ragas"
5354
html_theme = "sphinxawesome_theme"
5455
html_static_path = ["_static"]
5556
html_css_files = ["css/ragas.css"]
5657
html_favicon = "./_static/favicon.ico"
5758

58-
html_theme_options = {
59-
"logo_light": "./_static/imgs/ragas-logo.png",
60-
"logo_dark": "./_static/imgs/ragas-logo.png",
61-
}
6259

63-
# -- Myst NB Config -------------------------------------------------
64-
nb_execution_mode = "auto"
60+
from dataclasses import asdict
61+
62+
from sphinxawesome_theme import ThemeOptions
63+
64+
theme_options = ThemeOptions(
65+
logo_light="./_static/imgs/ragas-logo.png",
66+
logo_dark="./_static/imgs/ragas-logo.png",
67+
extra_header_link_icons={
68+
"discord": {
69+
"link": "https://discord.gg/5djav8GGNZ",
70+
"icon": """<svg height="26px" style="margin-right: 3px; display: inline" viewBox="0 0 22 22" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenod" clip-rule="evenod" d="M18.59 5.88997C17.36 5.31997 16.05 4.89997 14.67 4.65997C14.5 4.95997 14.3 5.36997 14.17 5.69997C12.71 5.47997 11.26 5.47997 9.83001 5.69997C9.69001 5.36997 9.49001 4.95997 9.32001 4.65997C7.94001 4.89997 6.63001 5.31997 5.40001 5.88997C2.92001 9.62997 2.25001 13.28 2.58001 16.87C4.23001 18.1 5.82001 18.84 7.39001 19.33C7.78001 18.8 8.12001 18.23 8.42001 17.64C7.85001 17.43 7.31001 17.16 6.80001 16.85C6.94001 16.75 7.07001 16.64 7.20001 16.54C10.33 18 13.72 18 16.81 16.54C16.94 16.65 17.07 16.75 17.21 16.85C16.7 17.16 16.15 17.42 15.59 17.64C15.89 18.23 16.23 18.8 16.62 19.33C18.19 18.84 19.79 18.1 21.43 16.87C21.82 12.7 20.76 9.08997 18.61 5.88997H18.59ZM8.84001 14.67C7.90001 14.67 7.13001 13.8 7.13001 12.73C7.13001 11.66 7.88001 10.79 8.84001 10.79C9.80001 10.79 10.56 11.66 10.55 12.73C10.55 13.79 9.80001 14.67 8.84001 14.67ZM15.15 14.67C14.21 14.67 13.44 13.8 13.44 12.73C13.44 11.66 14.19 10.79 15.15 10.79C16.11 10.79 16.87 11.66 16.86 12.73C16.86 13.79 16.11 14.67 15.15 14.67Z" fill="currentColor"/></svg>""",
71+
},
72+
"github": {
73+
"link": "https://github.com/explodinggradients/ragas",
74+
"icon": (
75+
'<svg height="26px" style="margin-top:-2px;display:inline" '
76+
'viewBox="0 0 45 44" '
77+
'fill="currentColor" xmlns="http://www.w3.org/2000/svg">'
78+
'<path fill-rule="evenodd" clip-rule="evenodd" '
79+
'd="M22.477.927C10.485.927.76 10.65.76 22.647c0 9.596 6.223 17.736 '
80+
"14.853 20.608 1.087.2 1.483-.47 1.483-1.047 "
81+
"0-.516-.019-1.881-.03-3.693-6.04 "
82+
"1.312-7.315-2.912-7.315-2.912-.988-2.51-2.412-3.178-2.412-3.178-1.972-1.346.149-1.32.149-1.32 " # noqa
83+
"2.18.154 3.327 2.24 3.327 2.24 1.937 3.318 5.084 2.36 6.321 "
84+
"1.803.197-1.403.759-2.36 "
85+
"1.379-2.903-4.823-.548-9.894-2.412-9.894-10.734 "
86+
"0-2.37.847-4.31 2.236-5.828-.224-.55-.969-2.759.214-5.748 0 0 "
87+
"1.822-.584 5.972 2.226 "
88+
"1.732-.482 3.59-.722 5.437-.732 1.845.01 3.703.25 5.437.732 "
89+
"4.147-2.81 5.967-2.226 "
90+
"5.967-2.226 1.185 2.99.44 5.198.217 5.748 1.392 1.517 2.232 3.457 "
91+
"2.232 5.828 0 "
92+
"8.344-5.078 10.18-9.916 10.717.779.67 1.474 1.996 1.474 4.021 0 "
93+
"2.904-.027 5.247-.027 "
94+
"5.96 0 .58.392 1.256 1.493 1.044C37.981 40.375 44.2 32.24 44.2 "
95+
'22.647c0-11.996-9.726-21.72-21.722-21.72" '
96+
'fill="currentColor"/></svg>'
97+
),
98+
},
99+
},
100+
)
65101

102+
html_theme_options = asdict(theme_options)
66103

104+
# -- Myst NB Config -------------------------------------------------
105+
nb_execution_mode = "auto"

requirements/docs.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
sphinx
22
git+https://github.com/kai687/sphinxawesome-theme.git
3-
myst-parser
3+
myst-parser[linkify]
44
myst-nb
55
sphinx_design
6-
linkify

0 commit comments

Comments
 (0)