Skip to content

Commit 40ebbcc

Browse files
committed
remove dotenv
1 parent b47613c commit 40ebbcc

File tree

5 files changed

+6
-93
lines changed

5 files changed

+6
-93
lines changed

nbs/metric/base.ipynb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@
114114
"source": [
115115
"#| eval: false\n",
116116
"\n",
117+
"from ragas_annotator.llm import ragas_llm\n",
118+
"from openai import OpenAI\n",
119+
"\n",
120+
"llm = ragas_llm(provider=\"openai\",model=\"gpt-4o\",client=OpenAI())\n",
121+
"\n",
117122
"@dataclass\n",
118123
"class CustomMetric(Metric):\n",
119124
" values: t.List[str] = field(default_factory=lambda: [\"pass\", \"fail\"])\n",
@@ -131,7 +136,7 @@
131136
" \n",
132137
" return results[0] # Placeholder for ensemble logic\n",
133138
"\n",
134-
"my_metric = CustomMetric(name=\"example\", prompt=\"What is the result of {input}?\", llm=LLM())\n",
139+
"my_metric = CustomMetric(name=\"example\", prompt=\"What is the result of {input}?\", llm=llm)\n",
135140
"my_metric.score(input=\"test\")"
136141
]
137142
}

nbs/metric/decorator.ipynb

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -150,29 +150,6 @@
150150
"### Example usage\n"
151151
]
152152
},
153-
{
154-
"cell_type": "code",
155-
"execution_count": null,
156-
"metadata": {},
157-
"outputs": [
158-
{
159-
"data": {
160-
"text/plain": [
161-
"True"
162-
]
163-
},
164-
"execution_count": null,
165-
"metadata": {},
166-
"output_type": "execute_result"
167-
}
168-
],
169-
"source": [
170-
"from dotenv import load_dotenv\n",
171-
"\n",
172-
"# Load environment variables from a .envrc file\n",
173-
"load_dotenv('/Users/shahules/Myprojects/ragas_annotator/.envrc')"
174-
]
175-
},
176153
{
177154
"cell_type": "code",
178155
"execution_count": null,

nbs/metric/discrete.ipynb

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -90,29 +90,6 @@
9090
"## Example usage"
9191
]
9292
},
93-
{
94-
"cell_type": "code",
95-
"execution_count": null,
96-
"metadata": {},
97-
"outputs": [
98-
{
99-
"data": {
100-
"text/plain": [
101-
"True"
102-
]
103-
},
104-
"execution_count": null,
105-
"metadata": {},
106-
"output_type": "execute_result"
107-
}
108-
],
109-
"source": [
110-
"from dotenv import load_dotenv\n",
111-
"\n",
112-
"# Load environment variables from a .envrc file\n",
113-
"load_dotenv('/Users/shahules/Myprojects/ragas_annotator/.envrc')"
114-
]
115-
},
11693
{
11794
"cell_type": "code",
11895
"execution_count": null,

nbs/metric/numeric.ipynb

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -82,29 +82,6 @@
8282
"### Example usage"
8383
]
8484
},
85-
{
86-
"cell_type": "code",
87-
"execution_count": null,
88-
"metadata": {},
89-
"outputs": [
90-
{
91-
"data": {
92-
"text/plain": [
93-
"True"
94-
]
95-
},
96-
"execution_count": null,
97-
"metadata": {},
98-
"output_type": "execute_result"
99-
}
100-
],
101-
"source": [
102-
"from dotenv import load_dotenv\n",
103-
"\n",
104-
"# Load environment variables from a .envrc file\n",
105-
"load_dotenv('/Users/shahules/Myprojects/ragas_annotator/.envrc')"
106-
]
107-
},
10885
{
10986
"cell_type": "code",
11087
"execution_count": null,

nbs/metric/ranking.ipynb

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -117,29 +117,6 @@
117117
"### Example usage"
118118
]
119119
},
120-
{
121-
"cell_type": "code",
122-
"execution_count": null,
123-
"metadata": {},
124-
"outputs": [
125-
{
126-
"data": {
127-
"text/plain": [
128-
"True"
129-
]
130-
},
131-
"execution_count": null,
132-
"metadata": {},
133-
"output_type": "execute_result"
134-
}
135-
],
136-
"source": [
137-
"from dotenv import load_dotenv\n",
138-
"\n",
139-
"# Load environment variables from a .envrc file\n",
140-
"load_dotenv('/Users/shahules/Myprojects/ragas_annotator/.envrc')"
141-
]
142-
},
143120
{
144121
"cell_type": "code",
145122
"execution_count": null,

0 commit comments

Comments
 (0)