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

Request for a documented way to add metadata such as the git tag across all of the langserve endpoints #658

Open
codekiln opened this issue May 21, 2024 · 0 comments

Comments

@codekiln
Copy link

codekiln commented May 21, 2024

feature request - global metadata

Let's say I have n langserve endpoints running on a single microservice with a single git tag. I'd like to be able to add the git tag for the microservice as a metadata item to langsmith for all the langserve endpoints running on that microservice. Is there a way to do that in a uniform way?

existing try for workaround (working) - adding to each chain

Let's say I have six endpoints, and I try adding .with_config({"tags": ["top-level-tag"], "metadata": {"top-level-key": "top-level-value"}}), following the langsmith docs, since each chain is a runnable.

add_routes(app, chain_1, path="/chain_1")
add_routes(app, chain_2, path="/chain_2")
add_routes(app, chain_3, path="/chain_3")
add_routes(app, chain_4, path="/chain_4")
add_routes(
    app,
    chain_5.with_config(
        {"tags": ["top-level-tag"], "metadata": {"top-level-key": "top-level-value"}}
    ),
    path="/chain_5",
)
add_routes(app, chain_6, path="/chain_6")

When I call /chain_5, I'm not seeing tags or metadata in the trace in the feedback section, though I am seeing the trace in langsmith. Have I done this incorrectly? [UPDATE - My mistake, this is actually working correctly]

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

No branches or pull requests

1 participant