standard-tests[patch]: add Ser/Des test

This commit is contained in:
Bagatur
2024-09-04 10:24:06 -07:00
parent af11fbfbf6
commit 3ec93c2817
41 changed files with 3074 additions and 2077 deletions

View File

@@ -11,6 +11,9 @@ integration_test integration_tests: TEST_FILE=tests/integration_tests/
test tests integration_test integration_tests:
poetry run pytest $(TEST_FILE)
test_watch:
poetry run ptw --snapshot-update --now . -- -vv $(TEST_FILE)
######################
# LINTING AND FORMATTING

View File

@@ -0,0 +1,72 @@
# serializer version: 1
# name: TestOpenAIStandard.test_serdes[serialized]
dict({
'graph': dict({
'edges': list([
dict({
'source': 0,
'target': 1,
}),
dict({
'source': 1,
'target': 2,
}),
]),
'nodes': list([
dict({
'data': 'AzureChatOpenAIInput',
'id': 0,
'type': 'schema',
}),
dict({
'data': dict({
'id': list([
'langchain',
'chat_models',
'azure_openai',
'AzureChatOpenAI',
]),
'name': 'AzureChatOpenAI',
}),
'id': 1,
'type': 'runnable',
}),
dict({
'data': 'AzureChatOpenAIOutput',
'id': 2,
'type': 'schema',
}),
]),
}),
'id': list([
'langchain',
'chat_models',
'azure_openai',
'AzureChatOpenAI',
]),
'kwargs': dict({
'azure_endpoint': 'https://test.azure.com',
'deployment_name': 'test',
'max_retries': 2,
'max_tokens': 100,
'n': 1,
'openai_api_key': dict({
'id': list([
'AZURE_OPENAI_API_KEY',
]),
'lc': 1,
'type': 'secret',
}),
'openai_api_type': 'azure',
'openai_api_version': '2021-10-01',
'request_timeout': 60.0,
'stop': list([
]),
'temperature': 0.0,
'validate_base_url': True,
}),
'lc': 1,
'name': 'AzureChatOpenAI',
'type': 'constructor',
})
# ---

View File

@@ -0,0 +1,69 @@
# serializer version: 1
# name: TestOpenAIStandard.test_serdes[serialized]
dict({
'graph': dict({
'edges': list([
dict({
'source': 0,
'target': 1,
}),
dict({
'source': 1,
'target': 2,
}),
]),
'nodes': list([
dict({
'data': 'ChatOpenAIInput',
'id': 0,
'type': 'schema',
}),
dict({
'data': dict({
'id': list([
'langchain',
'chat_models',
'openai',
'ChatOpenAI',
]),
'name': 'ChatOpenAI',
}),
'id': 1,
'type': 'runnable',
}),
dict({
'data': 'ChatOpenAIOutput',
'id': 2,
'type': 'schema',
}),
]),
}),
'id': list([
'langchain',
'chat_models',
'openai',
'ChatOpenAI',
]),
'kwargs': dict({
'max_retries': 2,
'max_tokens': 100,
'model_name': 'gpt-3.5-turbo',
'n': 1,
'openai_api_key': dict({
'id': list([
'OPENAI_API_KEY',
]),
'lc': 1,
'type': 'secret',
}),
'openai_proxy': '',
'request_timeout': 60.0,
'stop': list([
]),
'temperature': 0.0,
}),
'lc': 1,
'name': 'ChatOpenAI',
'type': 'constructor',
})
# ---