standard-tests[patch]: add tests for runnables as tools and streaming usage metadata (#24153)

This commit is contained in:
ccurme
2024-07-11 18:30:05 -04:00
committed by GitHub
parent d002fa902f
commit cb95198398
5 changed files with 49 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
import os
from typing import Type
import pytest
from langchain_core.language_models import BaseChatModel
from langchain_standard_tests.integration_tests import ChatModelIntegrationTests
@@ -30,3 +31,7 @@ class TestOpenAIStandard(ChatModelIntegrationTests):
"azure_endpoint": OPENAI_API_BASE,
"api_key": OPENAI_API_KEY,
}
@pytest.mark.xfail(reason="Not yet supported.")
def test_usage_metadata_streaming(self, model: BaseChatModel) -> None:
super().test_usage_metadata_streaming(model)

View File

@@ -18,7 +18,7 @@ class TestOpenAIStandard(ChatModelIntegrationTests):
@property
def chat_model_params(self) -> dict:
return {"model": "gpt-4o"}
return {"model": "gpt-4o", "stream_usage": True}
@property
def supports_image_inputs(self) -> bool: