mirror of
https://github.com/hwchase17/langchain.git
synced 2026-03-18 11:07:36 +00:00
fix(model-profiles): fix pdf_inputs field (#33797)
This commit is contained in:
@@ -154,7 +154,8 @@ def get_model_profile(provider: str, model: str) -> ModelProfile | None:
|
||||
"image_url_inputs": data.get("image_url_inputs"),
|
||||
"image_tool_message": data.get("image_tool_message"),
|
||||
"audio_inputs": "audio" in data.get("modalities", {}).get("input", []),
|
||||
"pdf_inputs": "pdf" in data.get("modalities", {}).get("input", []),
|
||||
"pdf_inputs": "pdf" in data.get("modalities", {}).get("input", [])
|
||||
or data.get("pdf_inputs"),
|
||||
"pdf_tool_message": data.get("pdf_tool_message"),
|
||||
"video_inputs": "video" in data.get("modalities", {}).get("input", []),
|
||||
"max_output_tokens": data.get("limit", {}).get("output"),
|
||||
|
||||
@@ -9,6 +9,7 @@ def test_chat_model() -> None:
|
||||
assert model.profile
|
||||
assert model.profile["max_input_tokens"] == 400000
|
||||
assert model.profile["structured_output"]
|
||||
assert model.profile["pdf_inputs"]
|
||||
|
||||
|
||||
def test_chat_model_no_data() -> None:
|
||||
|
||||
Reference in New Issue
Block a user