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

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

Open
bbiletskyy opened this issue Dec 19, 2024 · 0 comments

Comments

@bbiletskyy
Copy link

bbiletskyy commented Dec 19, 2024

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",
     )
 )
 ...
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