Skip to content

How to get an existing project? #926

@EvHaus

Description

@EvHaus

All the docs I've found on how to use the SDK (example) call:

project = braintrust.projects.create(name="RAG app")

But I want to use an existing project that I have, not create a new one. I can't figure this out.

The official SDK documentation doesn't mention the existence of braintrust.projects at all. No mention of ProjectBuilder objects either.

Methods like braintrust.projects.get and braintrust.projects.get_by_id don't exist... There's no documentation on available methods on this repo either.

Doing this doesn't work either:

experiment = braintrust.init(
  api_key=os.getenv("BRAINTRUST_API_KEY"),
  project_id=PROJECT_ID
)

# This looks like it works, but...
project = experiment.project

# If you try to call methods on it like this...
project.prompts.create(...)

# you get a failure

An update to the documentation would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions