Use codes in local machine

Hi , in the labs below is mentioned - how to enable the same? How to pass optional parameter?

Here in the Coursera environment some steps in reaching the Together API are handled on your behalf via a proxy server, so if you try to run this notebook outside the Coursera environment it won’t work right away. With small adjustments, however, you can pass an optional parameter with a together.ai API key, which will allow you to run these notebooks on your local machine.

Regards

Hi!

You can do so by either:

Adding the argument together_api_key to the function calls generate_with_single_input and generate_with_multiple_input. Or by adding an environment variable by running this:

import os
os.environ["TOGETHER_API_KEY"] = "your api key"

Please note that some labs will load vectorized collections (M3 - M5) so some parts of it won’t run locally.