langchain-ai / langserve

LangServe 🦜️🏓
Other
1.89k stars 211 forks source link

Issue with Playground Rendering After Updating Langserve Version #777

Open estebancatano opened 5 days ago

estebancatano commented 5 days ago

I updated my langserve version from 0.2.3 to 0.3.0, and I'm experiencing an issue.

If I pass config_keys=("run_id", "configurable", "metadata") as a parameter in the add_routes method, the playground is not displayed correctly.

image

This sample code also produces the error: add_routes( app, ChatOpenAI(model="gpt-4o-2024-08-06"), path="/openai", config_keys=("run_id", "configurable", "metadata"), )

The key run_id may be causing the error because if I remove it, it does render, but a warning appears for the metadata key.

image

The installed versions is as follows:

nicho2 commented 22 hours ago

I obtain this too image

config = {
    "configurable": {
        # le user_id donne les droits d'accès aux espaces
        "user_id": "3",
        # Checkpoints are accessed by thread_id
        "thread_id": thread_id

    },
    "run_name": "spaceUpChat"
}
runnable = graph.with_types(input_type=ChatInputType, output_type=dict)
runnable = runnable.with_config(config)
add_routes(app, runnable)
eyurtsev commented 9 hours ago

Thanks for reporting. I'll need to investigate