An overview of the Galileo SDKs
GALILEO_API_KEY
. The Galileo SDK will automatically pick this up from the environment variable at run time.
You can also optionally set the following environment variables to define the project, Log stream, and console URL that Galileo should use.
Environment variable | Description |
---|---|
GALILEO_PROJECT | The Galileo project to log to. If this is not set, you will need to pass the project name in code. |
GALILEO_LOG_STREAM | The default Log stream to log to. If this is not set, you will need to pass the Log stream name in code. |
GALILEO_CONSOLE_URL | For custom Galileo deployments only, set this to the URL of your Galileo Console to log to. If this is not set, it will default to the hosted Galileo version at app.galileo.ai. |
GALILEO_CONSOLE_URL
environment variable..env
file. Create or update a .env
file with the following values as required:
python-dotenv
if you haven’t already.
GALILEO_CONSOLE_URL
to your own installation.@log
decorator or log
wrapper, the Galileo SDK logs all AI prompts within.GalileoLogger
class - For more control over your logging, you can use the GalileoLogger
directly. This allows you to manually create sessions, start traces, and log spans. This can be mixed with the other methods, for example accessing the logger directly inside a decorated function call to manually add spans.