Skip to content

[Docs/Website] Add documentation about how to create examples #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
andrewmusselman opened this issue Apr 7, 2025 · 1 comment
Open
Assignees

Comments

@andrewmusselman
Copy link
Collaborator

andrewmusselman commented Apr 7, 2025

It would be helpful to have a clear guide on how to create and contribute example notebooks.

This documentation should:

  • Emphasize the use of Google Colab as the preferred environment, since it provides a clean and reproducible setup for running notebooks.
  • Follow the structure and style established in:
    • website/developers/contribute_agentic_framework.md
    • website/developers/contribute_tool.md

The goal is to make it easy for contributors to add meaningful examples that are easy to run, understand, and maintain. Ideally, the documentation would include:

  • Naming conventions
  • Where to place the examples
  • Tips for making examples lightweight but informative
  • How to link examples from relevant documentation pages
@andrewmusselman andrewmusselman self-assigned this Apr 7, 2025
@rawkintrevo rawkintrevo changed the title [Docs/Website] Add examples [Docs/Website] Add documentation about how to create examples Apr 8, 2025
@rawkintrevo
Copy link
Contributor

from #251

  • Add a bit about Colab being the default (and why) see hip shot blurb i did [1]
  • Add a bit about loading api keys- also colab related [2]

[1]

Setting API Keys

The following code may seem complex, but the gofannon project standardizes our examples on Google Colab because it provides users around the world with a consistent environment for experimentation, and when using "CPU Only" mode (which almost all of our examples are), it is free. So the following code will attempt to load environment secrets the colab way, and if that fails, will attempt to load them from environment variables. You as the user could also delete the code that follows and replace it with:

openai_api_key = "<YOUR OPENAI KEY>"
nasa_api_key = "<YOUR NASA KEY>"

[2]

colab_present = False
try:
    from google.colab import userdata
    colab_present = True
except:
    pass

if colab_present:
    openai_api_key = userdata.get('open_ai_key')
    nasa_api_key = userdata.get('nasa_api_key')
else:
   open_api_key = os.environ['OPENAI_API_KEY']
   nasa_api_key = os.environ['NASA_API_KEY']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants