Skip to content
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

draft: programmatically managing workspaces #609

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

davidx33
Copy link
Contributor

guide for programmatically managing workspaces. draft

Copy link

vercel bot commented Dec 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langsmith-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 15, 2025 5:30am


# Set headers for API request
headers = {
"Content-Type": "application/json",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: indentation

value: "python",
label: "Python",
language: "python",
content: `from dotenv import load_dotenv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you include submitting a run to each workspace as well?
@hinthornw I think you've sent over code snippets for this use case, anything missing?

@@ -184,6 +186,87 @@ Use [resource tags](#resource-tags) to organize resources by environment using t
permissions when we release attribute based access control (ABAC). ABAC on the resource tag will provide a fine-grained way to restrict access to production tracing projects, for example. We do not recommend that you use Workspaces for environment separation as you cannot share resources
across Workspaces. If you would like to promote a prompt from `staging` to `prod`, we recommend you use prompt tags instead. See [docs](../prompt_engineering/concepts#tags) for more information.

### Programmatically Managing Workspaces
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a better title would be Programmatically Operating Across Workspaces or similar, since these aren't management actions, they're just standard SDK usage for the most part (minus the workspace creation)

}

session = requests.Session()
session.headers.update(headers)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe include a note that this session is shared across the SDK (pretty certain that's the case?), so be careful to avoid operating on the wrong workspace

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

Successfully merging this pull request may close these issues.

2 participants