File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 99 execute_notebooks :
1010 runs-on : ubuntu-latest
1111
12+ env :
13+ COHERE_API_KEY : ${{ secrets.COHERE_API_KEY }}
14+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
15+
16+
1217 steps :
1318 - name : Checkout repository
1419 uses : actions/checkout@v2
1520
1621 - name : Set up Python
1722 uses : actions/setup-python@v2
1823 with :
19- python-version : 3.x
24+ python-version : 3.11. x
2025
2126 - name : Install dependencies
2227 run : |
23- pip install jupyter nbconvert
28+ make full; pip install jupyter nbconvert; pip install .
2429
2530 - name : Execute notebooks and check for errors
2631 run : |
Original file line number Diff line number Diff line change 298298 " from guardrails import Guard\n " ,
299299 " from guardrails.validators import ProvenanceV0\n " ,
300300 " from typing import List, Union\n " ,
301+ " import os\n " ,
302+ " \n " ,
303+ " api_key = os.environ[\" COHERE_API_KEY\" ]\n " ,
301304 " \n " ,
302305 " # Create a cohere client\n " ,
303- " cohere_client = cohere.Client(api_key=\" <Cohere_API_KEY> \" )\n " ,
306+ " cohere_client = cohere.Client(api_key=api_key )\n " ,
304307 " \n " ,
305308 " \n " ,
306309 " def embed_function(text: Union[str, List[str]]) -> np.ndarray:\n " ,
You can’t perform that action at this time.
0 commit comments