mypy fixes
This commit is contained in:
parent
666a4f85b9
commit
b04761affc
3 changed files with 9 additions and 3 deletions
|
|
@ -295,12 +295,17 @@ class OpenAILanguageModel(LanguageModel):
|
|||
kwargs["max_completion_tokens"] = self.max_tokens
|
||||
data["top_p"] = 1
|
||||
data["streaming"] = False
|
||||
data["max_tokens"] = None
|
||||
else:
|
||||
data["max_tokens"] = self.max_tokens
|
||||
data["top_p"] = self.top_p
|
||||
data["streaming"] = self.streaming
|
||||
|
||||
return ChatOpenAI(
|
||||
**data,
|
||||
model_name=data.get("model_name"),
|
||||
temperature=data.get("temperature"),
|
||||
streaming=data.get("streaming"),
|
||||
max_tokens=data.get("max_tokens"),
|
||||
top_p=data.get("top_p"),
|
||||
model_kwargs=kwargs,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -268,7 +268,8 @@ with transformations_tab:
|
|||
selected_transformations[transformation["name"]] = st.checkbox(
|
||||
f"**{transformation['name']}**",
|
||||
value=(
|
||||
transformation["name"] in default_transformations.source_insights
|
||||
transformation["name"]
|
||||
in (default_transformations.source_insights or [])
|
||||
),
|
||||
)
|
||||
st.write(transformation["description"])
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ with open("transformations.yaml", "r") as file:
|
|||
|
||||
insight_transformations = transformations["source_insights"]
|
||||
|
||||
transformation = st.selectbox(
|
||||
transformation: dict = st.selectbox(
|
||||
"Pick a transformation",
|
||||
insight_transformations,
|
||||
format_func=lambda x: x.get("name", "No Name"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue