Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan committed Nov 6, 2023
1 parent b6716fa commit 0248813
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3190,8 +3190,25 @@
'type': 'object',
}),
'content': dict({
'anyOf': list([
dict({
'type': 'string',
}),
dict({
'items': dict({
'anyOf': list([
dict({
'type': 'string',
}),
dict({
'type': 'object',
}),
]),
}),
'type': 'array',
}),
]),
'title': 'Content',
'type': 'string',
}),
'type': dict({
'default': 'system',
Expand Down Expand Up @@ -3223,8 +3240,25 @@
'type': 'object',
}),
'content': dict({
'anyOf': list([
dict({
'type': 'string',
}),
dict({
'items': dict({
'anyOf': list([
dict({
'type': 'string',
}),
dict({
'type': 'object',
}),
]),
}),
'type': 'array',
}),
]),
'title': 'Content',
'type': 'string',
}),
'example': dict({
'default': False,
Expand Down Expand Up @@ -3254,8 +3288,25 @@
'type': 'object',
}),
'content': dict({
'anyOf': list([
dict({
'type': 'string',
}),
dict({
'items': dict({
'anyOf': list([
dict({
'type': 'string',
}),
dict({
'type': 'object',
}),
]),
}),
'type': 'array',
}),
]),
'title': 'Content',
'type': 'string',
}),
'role': dict({
'title': 'Role',
Expand Down Expand Up @@ -3329,8 +3380,25 @@
'type': 'object',
}),
'content': dict({
'anyOf': list([
dict({
'type': 'string',
}),
dict({
'items': dict({
'anyOf': list([
dict({
'type': 'string',
}),
dict({
'type': 'object',
}),
]),
}),
'type': 'array',
}),
]),
'title': 'Content',
'type': 'string',
}),
'name': dict({
'title': 'Name',
Expand Down Expand Up @@ -3360,8 +3428,25 @@
'type': 'object',
}),
'content': dict({
'anyOf': list([
dict({
'type': 'string',
}),
dict({
'items': dict({
'anyOf': list([
dict({
'type': 'string',
}),
dict({
'type': 'object',
}),
]),
}),
'type': 'array',
}),
]),
'title': 'Content',
'type': 'string',
}),
'example': dict({
'default': False,
Expand Down
65 changes: 60 additions & 5 deletions libs/langchain/tests/unit_tests/schema/runnable/test_runnable.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,18 @@ async def typed_async_lambda_impl(x: str) -> int:
"description": "A Message from an AI.",
"type": "object",
"properties": {
"content": {"title": "Content", "type": "string"},
"content": {
"title": "Content",
"anyOf": [
{"type": "string"},
{
"type": "array",
"items": {
"anyOf": [{"type": "string"}, {"type": "object"}]
},
},
],
},
"additional_kwargs": {
"title": "Additional Kwargs",
"type": "object",
Expand All @@ -319,7 +330,18 @@ async def typed_async_lambda_impl(x: str) -> int:
"description": "A Message from a human.",
"type": "object",
"properties": {
"content": {"title": "Content", "type": "string"},
"content": {
"title": "Content",
"anyOf": [
{"type": "string"},
{
"type": "array",
"items": {
"anyOf": [{"type": "string"}, {"type": "object"}]
},
},
],
},
"additional_kwargs": {
"title": "Additional Kwargs",
"type": "object",
Expand All @@ -343,7 +365,18 @@ async def typed_async_lambda_impl(x: str) -> int:
"description": "A Message that can be assigned an arbitrary speaker (i.e. role).", # noqa: E501
"type": "object",
"properties": {
"content": {"title": "Content", "type": "string"},
"content": {
"title": "Content",
"anyOf": [
{"type": "string"},
{
"type": "array",
"items": {
"anyOf": [{"type": "string"}, {"type": "object"}]
},
},
],
},
"additional_kwargs": {
"title": "Additional Kwargs",
"type": "object",
Expand All @@ -363,7 +396,18 @@ async def typed_async_lambda_impl(x: str) -> int:
"description": "A Message for priming AI behavior, usually passed in as the first of a sequence\nof input messages.", # noqa: E501
"type": "object",
"properties": {
"content": {"title": "Content", "type": "string"},
"content": {
"title": "Content",
"anyOf": [
{"type": "string"},
{
"type": "array",
"items": {
"anyOf": [{"type": "string"}, {"type": "object"}]
},
},
],
},
"additional_kwargs": {
"title": "Additional Kwargs",
"type": "object",
Expand All @@ -382,7 +426,18 @@ async def typed_async_lambda_impl(x: str) -> int:
"description": "A Message for passing the result of executing a function back to a model.", # noqa: E501
"type": "object",
"properties": {
"content": {"title": "Content", "type": "string"},
"content": {
"title": "Content",
"anyOf": [
{"type": "string"},
{
"type": "array",
"items": {
"anyOf": [{"type": "string"}, {"type": "object"}]
},
},
],
},
"additional_kwargs": {
"title": "Additional Kwargs",
"type": "object",
Expand Down

0 comments on commit 0248813

Please sign in to comment.