You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class BackendSpanExporter(TracingExporter):
def init(
self,
api_key: str | None = None,
organization: str | None = None,
project: str | None = None,
endpoint: str = "https://api.openai.com/v1/traces/ingest",
max_retries: int = 3,
base_delay: float = 1.0,
max_delay: float = 30.0,
):
"""
Args:
api_key: The API key for the "Authorization" header. Defaults to os.environ["OPENAI_TRACE_API_KEY"] if not provided.
organization: The OpenAI organization to use. Defaults to os.environ["OPENAI_ORG_ID"] if not provided.
project: The OpenAI project to use. Defaults to os.environ["OPENAI_PROJECT_ID"] if not provided.
endpoint: The HTTP endpoint to which traces/spans are posted.
max_retries: Maximum number of retries upon failures.
base_delay: Base delay (in seconds) for the first backoff.
max_delay: Maximum delay (in seconds) for backoff growth.
"""
self.api_key = api_key or os.environ.get("OPENAI_API_KEY") # should be OPENAI_TRACE_API_KEY, right ?
self.organization = organization or os.environ.get("OPENAI_ORG_ID")
self.project = project or os.environ.get("OPENAI_PROJECT_ID")
get the wrong environment variable.
The text was updated successfully, but these errors were encountered:
class BackendSpanExporter(TracingExporter):
def init(
self,
api_key: str | None = None,
organization: str | None = None,
project: str | None = None,
endpoint: str = "https://api.openai.com/v1/traces/ingest",
max_retries: int = 3,
base_delay: float = 1.0,
max_delay: float = 30.0,
):
"""
Args:
api_key: The API key for the "Authorization" header. Defaults to
os.environ["OPENAI_TRACE_API_KEY"]
if not provided.organization: The OpenAI organization to use. Defaults to
os.environ["OPENAI_ORG_ID"]
if not provided.project: The OpenAI project to use. Defaults to
os.environ["OPENAI_PROJECT_ID"]
if not provided.endpoint: The HTTP endpoint to which traces/spans are posted.
max_retries: Maximum number of retries upon failures.
base_delay: Base delay (in seconds) for the first backoff.
max_delay: Maximum delay (in seconds) for backoff growth.
"""
self.api_key = api_key or os.environ.get("OPENAI_API_KEY") # should be OPENAI_TRACE_API_KEY, right ?
self.organization = organization or os.environ.get("OPENAI_ORG_ID")
self.project = project or os.environ.get("OPENAI_PROJECT_ID")
get the wrong environment variable.
The text was updated successfully, but these errors were encountered: