Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Use the Scope3 platform to track the environmental impact of your use of AI

License

Notifications You must be signed in to change notification settings

scope3data/scope3ai-python

 
 

Repository files navigation

Track the environmental impact of your use of AI

Installation

pip install scope3ai

Usage

from scope3ai import Scope3AI
from openai import OpenAI

# Initialize Scope3 with parameters
Scope3.init(log=false, environment=production, project="customer service")

client = OpenAI(api_key="<OPENAI_API_KEY>")

response = client.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[
        {"role": "user", "content": "How can I get more out of my subscription?"}
    ]
)

# Get environmental impact metrics
print(f"Estimated CO2e impact: {response.scope3.total_gco2e} g")
print(f"Estimated water impact: {response.scope3.total_mlh2o} ml")
print(f"Estimated energy use: {response.scope3.total_energy_wh} wh")

Parameters

todo

License

todo

About

Use the Scope3 platform to track the environmental impact of your use of AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Makefile 0.2%