Skip to content

Playground displays blank page for ChatBedrock based chain with configurable_filed temperature #804

@bbiletskyy

Description

@bbiletskyy

The playground shows the blank page for ChatBedrock based chain with configurable_field for llm temperature.
The playground works fine without the configurable_field.
Setting the temperature via the swagger WebUI works fine.

Setup:
langchain-aws==0.2.9
langserve==0.3.0

class JokeRequest(BaseModel):
    topic: str

llm = ChatBedrockConverse(
    model_id="meta.llama3-8b-instruct-v1:0",  # "amazon.titan-text-express-v1" gives the same result
    temperature=0.0,
).configurable_fields(temperature=ConfigurableField(
        id="llm_temperature",
        name="LLM Temperature",
        description="The temperature of the LLM",
    )
)

add_routes(
    app,
    PromptTemplate.from_template("Tell me a joke about {topic}") | llm | StrOutputParser(),
    path="/joke",
    input_type=JokeRequest,
    output_type=str,
)

Also tried this with the same result

...
llm = ChatBedrock(
         model_id="meta.llama3-8b-instruct-v1:0",
         model_kwargs=dict(temperature=0.0),
         beta_use_converse_api=True, # False gives the same result
     ).configurable_fields(temperature=ConfigurableField(
         id="llm_temperature",
         name="LLM Temperature",
         description="The temperature of the LLM",
     )
 )
 ...

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