Serialize and deserialize chains #9
Annotations
4 errors and 1 warning
src/compiler/chain-serialize.test.ts > serialize chain > serialize with single step:
src/compiler/chain-serialize.test.ts#L46
AssertionError: expected { …(6) } to deeply equal { scope: { …(2) }, …(4) }
- Expected
+ Received
Object {
"adapterType": "default",
"ast": Object {
"children": Array [
Object {
"end": 45,
"raw": "
provider: OpenAI_PATATA
model: gpt-4",
"start": 0,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "Config",
"value": "
provider: OpenAI_PATATA
model: gpt-4",
},
Object {
"end": 62,
- "expression": Object {
+ "expression": Node {
"end": 59,
- "left": Object {
+ "left": Node {
"end": 51,
"loc": Any<Object>,
"name": "foo",
"start": 48,
"type": "Identifier",
},
"loc": Any<Object>,
"operator": "=",
- "right": Object {
+ "right": Node {
"end": 59,
"loc": Any<Object>,
"raw": "'foo'",
"start": 54,
"type": "Literal",
"value": "foo",
},
"start": 48,
"type": "AssignmentExpression",
},
"start": 45,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "MustacheTag",
},
Object {
"data": "
A message",
"end": 72,
"raw": "
A message",
"start": 62,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "Text",
},
],
"end": 72,
"start": 0,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "Fragment",
},
"compilerOptions": Object {},
"globalConfig": Object {
"model": "gpt-4",
"provider": "OpenAI_PATATA",
},
+ "globalMessages": Array [
+ Object {
+ "content": Array [
+ Object {
+ "text": "A message",
+ "type": "text",
+ },
+ ],
+ "role": "system",
+ },
+ ],
"scope": Object {
"pointers": Object {
"foo": 0,
},
"stash": Array [
"foo",
],
},
}
❯ src/compiler/chain-serialize.test.ts:46:24
|
src/compiler/chain-serialize.test.ts > serialize chain > serialize 2 steps:
src/compiler/chain-serialize.test.ts#L133
AssertionError: expected { …(6) } to deeply equal { scope: { …(2) }, …(4) }
- Expected
+ Received
Object {
"adapterType": "openai",
"ast": Object {
"children": Array [
Object {
"attributes": Array [],
"children": Array [
Object {
"data": "
",
"end": 9,
"raw": "
",
"start": 6,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "Text",
},
Object {
"end": 20,
- "expression": Object {
+ "expression": Node {
"end": 18,
- "left": Object {
+ "left": Node {
"end": 14,
"loc": Any<Object>,
"name": "foo",
"start": 11,
"type": "Identifier",
},
"loc": Any<Object>,
"operator": "=",
- "right": Object {
+ "right": Node {
"end": 18,
"loc": Any<Object>,
"raw": "5",
"start": 17,
"type": "Literal",
"value": 5,
},
"start": 11,
"type": "AssignmentExpression",
},
"start": 9,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "MustacheTag",
},
Object {
"data": "
",
"end": 21,
"raw": "
",
"start": 20,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "Text",
},
],
"end": 28,
"name": "step",
"start": 0,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "ElementTag",
},
Object {
"data": "
",
"end": 29,
"raw": "
",
"start": 28,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "Text",
},
Object {
"attributes": Array [],
"children": Array [
Object {
"data": "
",
"end": 38,
"raw": "
",
"start": 35,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "Text",
},
Object {
"end": 50,
- "expression": Object {
+ "expression": Node {
"end": 48,
- "left": Object {
+ "left": Node {
"end": 43,
"loc": Any<Object>,
"name": "foo",
"start": 40,
"type": "Identifier",
},
"loc": Any<Object>,
"operator": "+=",
- "right": Object {
+ "right": Node {
"end": 48,
"loc": Any<Object>,
"raw": "1",
"start": 47,
"type": "Literal",
"value": 1,
},
"start": 40,
"type": "AssignmentExpression",
},
"start": 38,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "MustacheTag",
},
Object {
"data": "
",
"end": 51,
"raw": "
",
"start": 50,
"status": Object {
"completedAs": true,
"s
|
src/compiler/chain-serialize.test.ts > serialize chain > serialize parameters:
src/compiler/chain-serialize.test.ts#L315
AssertionError: expected { …(6) } to deeply equal { adapterType: 'default', …(3) }
- Expected
+ Received
Object {
"adapterType": "default",
"ast": Object {
"children": Array [
Object {
"data": "Hello ",
"end": 6,
"raw": "Hello ",
"start": 0,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "Text",
},
Object {
"end": 14,
- "expression": Object {
+ "expression": Node {
"end": 12,
"loc": Any<Object>,
"name": "name",
"start": 8,
"type": "Identifier",
},
"start": 6,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "MustacheTag",
},
],
"end": 14,
"start": 0,
"status": Object {
"completedAs": true,
"scopePointers": undefined,
},
"type": "Fragment",
},
"compilerOptions": Object {
"defaultRole": "user",
+ },
+ "globalConfig": undefined,
+ "globalMessages": Array [
+ Object {
+ "content": Array [
+ Object {
+ "text": "Hello Paco",
+ "type": "text",
+ },
+ ],
+ "role": "user",
},
+ ],
"scope": Object {
"pointers": Object {
"name": 0,
},
"stash": Array [
"Paco",
],
},
}
❯ src/compiler/chain-serialize.test.ts:315:24
|
test (20.x)
Process completed with exit code 1.
|
test (20.x)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|