-
Notifications
You must be signed in to change notification settings - Fork 243
/
rivet.rivet-project
5054 lines (4306 loc) · 196 KB
/
rivet.rivet-project
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
version: 4
data:
attachedData:
trivet:
testSuites: []
version: 1
graphs:
1C7HNzd5v7ULqf04-5Uob:
metadata:
description: ""
id: 1C7HNzd5v7ULqf04-5Uob
name: RA - Recall Memories
nodes:
'[9HlRtZ5rPSP7q5FiAHjP4]:graphOutput "Graph Output"':
data:
dataType: object[]
id: items
visualData: 1633.1906333726722/443.91188062401466/300/31
'[QD7tiW9UZpo6N30A5foaD]:extractObjectPath "Extract Object Path"':
data:
path: $.topic
usePathInput: false
visualData: 683/375/250/2
'[UqDCzlc17MI37nenyQCWR]:graphInput "Graph Input"':
data:
dataType: string
defaultValue: This is a test topic
id: topic
useDefaultValueInput: false
outgoingConnections:
- data->"Get Embedding" u0PxZtqctJpURQO38Gg9s/input
visualData: 316.85283656184424/219.3939539319971/300/29
'[ZljA5lFqK9KWtpwOGZFSZ]:vectorNearestNeighbors "Vector KNN"':
data:
collectionId: rivet-3ff65ea.svc.us-west1-gcp-free.pinecone.io/test1
integration: pinecone
k: 10
useKInput: true
outgoingConnections:
- results->"Graph Output" 9HlRtZ5rPSP7q5FiAHjP4/value
visualData: 1279.3360881667509/408.90705286005004/200/24
'[u0PxZtqctJpURQO38Gg9s]:getEmbedding "Get Embedding"':
data:
integration: openai
useIntegrationInput: false
outgoingConnections:
- embedding->"Vector KNN" ZljA5lFqK9KWtpwOGZFSZ/vector
visualData: 1033.9087435447254/383.59221170727943/200/23
'[uL9pTJZMx-cuabCpqrtFI]:graphInput "Graph Input"':
data:
dataType: number
defaultValue: "3"
id: n
useDefaultValueInput: false
outgoingConnections:
- data->"Vector KNN" ZljA5lFqK9KWtpwOGZFSZ/k
visualData: 313.1910654160657/406.14428236670517/300/30
3BWUibK-Zr_i2GjKA277_:
metadata:
description: ""
id: 3BWUibK-Zr_i2GjKA277_
name: RA - Extract Commands
nodes:
'[U-sUa3iW4WAjSKQNC8_1e]:graphInput "Graph Input"':
data:
dataType: string
id: input
useDefaultValueInput: false
outgoingConnections:
- data->"Extract YAML" WLtSibdAgyBDWM6gSuUhR/input
visualData: 259/369/300/1
'[WLtSibdAgyBDWM6gSuUhR]:extractYaml "Extract YAML"':
data:
objectPath: $.systemCommands[*]
rootPropertyName: systemCommands
outgoingConnections:
- matches->"Graph Output" g3sxYEM5E-xJYvcuuGZRB/value
visualData: 613/378/250/3
'[g3sxYEM5E-xJYvcuuGZRB]:graphOutput "Graph Output"':
data:
dataType: object[]
id: commands
visualData: 974.8003300330032/379.94224422442244/300/9
49ADNSJiXKFRvgaRMhFvP:
metadata:
description: ""
id: 49ADNSJiXKFRvgaRMhFvP
name: RA - Get Response
nodes:
'[6P8d2awK1kumFWb15ecLK]:subGraph "Subgraph"':
data:
graphId: HRMMlTL5W-Wau-f7nLLEh
outgoingConnections:
- system_prompt->"Chat" 8WoCCKIA_CkgUFUS9Z2ZI/systemPrompt
visualData: 1456.4238678422316/454.96652023842444/300/51
'[8WoCCKIA_CkgUFUS9Z2ZI]:chat "Chat"':
data:
cache: false
enableFunctionUse: false
frequencyPenalty: 0
maxTokens: 4096
model: gpt-4-0613
presencePenalty: 0
stop: ""
temperature: 0.5
top_p: 1
useFrequencyPenaltyInput: false
useMaxTokensInput: false
useModelInput: false
usePresencePenaltyInput: false
useStop: false
useStopInput: false
useTemperatureInput: false
useTopP: false
useTopPInput: false
useUseTopPInput: false
useUserInput: false
outgoingConnections:
- response->"Graph Output" kviYXdprAn_78olEtAd-6/value
- response->"Prompt" iJA7SfvwwBOoyE88k97cT/input
- response->"Subgraph" yqSRYu7edOEf3tZQaKswg/input
visualData: 1965.1016252864763/547.5345614232717/200/67
'[9brCG6eTcOIXX31erjqGu]:assemblePrompt "Assemble Prompt"':
outgoingConnections:
- prompt->"Graph Output" DL8bb2mbzNz2rSU2s7KUu/value
visualData: 2872.693974555739/713.594640498702/250/null
'[DL8bb2mbzNz2rSU2s7KUu]:graphOutput "Graph Output"':
data:
dataType: chat-message[]
id: new_messages
visualData: 3297.258302221817/669.5769681505825/300/61
'[DjJurzETlQAbzGr1rHdrc]:graphInput "Graph Input"':
data:
dataType: string
defaultValue: This is a test
id: prompt_message
useDefaultValueInput: false
outgoingConnections:
- data->"Prompt" _ALVrW2X1sanCPkXgVBtx/input
visualData: 544.1815668099302/926.8873241664447/300/63
'[Kc9vHiGqFgor7QZhi1ezN]:trimChatMessages "Trim Chat Messages"':
data:
maxTokenCount: 4096
model: gpt-4
removeFromBeginning: true
outgoingConnections:
- trimmed->"Chat" 8WoCCKIA_CkgUFUS9Z2ZI/prompt
visualData: 1658.6972703882811/613.0651361023686/200/55
'[_ALVrW2X1sanCPkXgVBtx]:prompt "Prompt"':
data:
enableFunctionCall: false
name: SYSTEM INFORMATION
promptText: "{{input}}"
type: user
useTypeInput: false
outgoingConnections:
- output->"Assemble Prompt" uy7Kir4TGhQ-7vrOelzOG/message2
visualData: 949.3527093687692/918.8482141950393/250/65
'[iJA7SfvwwBOoyE88k97cT]:prompt "Prompt"':
data:
enableFunctionCall: false
promptText: "{{input}}"
type: assistant
useTypeInput: false
outgoingConnections:
- output->"Assemble Prompt" 9brCG6eTcOIXX31erjqGu/message2
visualData: 2294.628246648416/401.9702599338506/250/16
'[kviYXdprAn_78olEtAd-6]:graphOutput "Graph Output"':
data:
dataType: string
id: chat_output
visualData: 3321.346081191017/948.6316276694499/300/66
'[raxkQiq1D9gedJiuQYUDd]:graphInput "Graph Input"':
data:
dataType: chat-message[]
id: current_messages
outgoingConnections:
- data->"Assemble Prompt" uy7Kir4TGhQ-7vrOelzOG/message1
visualData: 833.2481831324469/704.4215206372613/300/57
'[s_dZ9oRH1p1IJCuyKuyg3]:subGraph "Subgraph"':
data:
graphId: u6yVHvgJi01zZYY_5f4y3
outgoingConnections:
- commands_output->"Assemble Prompt" 9brCG6eTcOIXX31erjqGu/message3
visualData: 2560.6006996846772/602.3956477259945/196.3548034934497/13
'[uy7Kir4TGhQ-7vrOelzOG]:assemblePrompt "Assemble Prompt"':
outgoingConnections:
- prompt->"Assemble Prompt" 9brCG6eTcOIXX31erjqGu/message1
- prompt->"Trim Chat Messages" Kc9vHiGqFgor7QZhi1ezN/input
visualData: 1313.7972976989524/681.9189138753514/250/58
'[yqSRYu7edOEf3tZQaKswg]:subGraph "Subgraph"':
data:
graphId: 3BWUibK-Zr_i2GjKA277_
outgoingConnections:
- commands->"Subgraph" s_dZ9oRH1p1IJCuyKuyg3/commands
visualData: 2264.247517768967/599.2763797815367/202.5425764192139/11
5S6OjvRiN5DSNiYVUxf2d:
metadata:
description: ""
id: 5S6OjvRiN5DSNiYVUxf2d
name: Graph Maker
nodes:
'[-ELvIeQcb0AtnN6y0Y4w9]:prompt "Prompt"':
data:
enableFunctionCall: false
promptText: >-
You are an AI for creating graphs in Rivet based on a user's
specifications. You know everything you can do with Rivet, and you
create an entire graph in plain english based on the user's
request.
Rivet Specification:
{{rivet}}
# Goal
The user will ask you to create a graph. You must output a series of steps you will take to great a graph like the user has asked for.
For example:
- Add a X node and name it "Foo"
- Add a Y node and name it "Bar"
- Connect the "x" output of Foo to the Y output of Bar
- Etc
Your steps should be extremely thorough, complete, and in plain english.
type: system
useTypeInput: false
outgoingConnections:
- output->"Chat" Sao72Qnzs9LA6eJXT5FX8/systemPrompt
visualData: 1262/546/250/3
'[Sao72Qnzs9LA6eJXT5FX8]:chat "Chat"':
data:
cache: false
enableFunctionUse: false
frequencyPenalty: 0
maxTokens: 1024
model: gpt-3.5-turbo
presencePenalty: 0
stop: ""
temperature: 0.5
top_p: 1
useAsGraphPartialOutput: true
useFrequencyPenaltyInput: false
useMaxTokensInput: false
useModelInput: false
usePresencePenaltyInput: false
useStop: false
useStopInput: false
useTemperatureInput: false
useTopP: false
useTopPInput: false
useUseTopPInput: false
useUserInput: false
visualData: 1639/620/200/5
'[hn39Ds4GBHK0C8LkBmA5X]:prompt "Prompt"':
data:
enableFunctionCall: false
promptText: Can you give me a graph that would be suitable as a tutorial?
type: user
useTypeInput: false
visualData: 1131/925/250/null
'[qp4n1iV7rXEYXlfWsXUkl]:text "Text"':
data:
text: >-
# Rivet
Rivet is a graph-based tool for creating AI large languagte models chains and AI agents. Rivet works by linking together nodes using their input and output ports. Data flows through the wires to the next node. The graphs start at nodes without inputs, and proceed to nodes without outputs. Graphs are turing-complete due to the variety of nodes available.
## Nodes
Available nodes are:
#### Text Node
Outputs a string of text. It can also interpolate values using interpolation tags. Inputs are dynamic based on the tags (words inside {{}}).
#### Prompt Node
Outputs a Chat Message, which is a string of text with an attached "Assistant", "User", or "System" tag, and optionally a message.
#### Chunk Node
Splits the input text into an array of chunks based on an approximate GPT token count per chunk.
#### Extract With Regex Node
Extracts data from the input text using the configured regular expression. The regular expression can contain capture groups to extract specific parts of the text.
Each capture group corresponds to an output port of the node.
#### Chat Node
Performs a chat with OpenAI. Takes two inputs - a system prompt (optional) and a prompt (which is either a list of strings, chat-messages, or a single string/chat-message). Outputs the response from the AI.
#### Assemble Prompt Node
Takes in a list of strings or chat-messages or arrays of each and outputs a flat list of chat messages for use with a Chat Node.
#### Array Node
Creates an array from the input values. Number of inputs is unlimited. Outputs the array, and its length, and the indexes.
#### Pop Node
Pops the last value off the input array and outputs the new array and the popped value.
#### Number Node
Outputs a configurable number.
#### Extract JSON
Given a string, extracts a JSON object out of the string, parses it, and outputs the object.
#### Extract YAML
Given a string, extracts a YAML object out of the string (must start with `yamlDocument:` by default) and outputs the object.
#### Extract Object Path
Uses jsonpath to extract something out of an object. Outputs the extracted value.
#### Bool Node
Outputs a boolean value.
#### Match Node
Configured with a list of strings. Each string is a regular expression. For the matching regex, the output port with the same index is given the input string. All other output ports are not ran.
#### If Node
Two inputs - if and value. If the `if` value is truthy, the `value` is passed through. Otherwise, the output is not ran.
#### If/Else Node
Three inputs, `if`, `true`, and `false`. If the `if` value is truthy, the `true` value is passed through. Otherwise, the `false` value is passed through.
#### Loop Controller Node
Marks a loop. The `continue` input specifies whether the loop should continue after the first iteration. Contains unlimited pairs of values. For example, `input1` is the value that should be output for `output2`, except for the first iteration, which takes its value from the `input1Default` input. Nodes inside the loop should wrap around to connect to the `inputX` inputs or the `continue` input. The `break` output is executed when `continue` is false, and has the list of values.
#### Coalesce Node
Any number of inputs. Takes the first non-null input and outputs it.
#### Graph Output Node
Each instance of this node represents an individual output of the graph. The value passed into this node becomes part of the overall output of the graph. The `id` data of this specifies the name of the output.
#### Graph Input Node
Defines an input for the graph which can be passed in when the graph is called, or defines one of the input ports when the graph is a subgraph. The `id` data of this specifies the name of the input.
#### User Input Node
Prompts the user for input during the execution of the graph. The user's response becomes the output of this node. Can be configured to either prompt with and input port, or with a static configured text.
#### Subgraph Node
Calls a subgraph as a node. The inputs of the node come from the graph's Graph Input Nodes, and the outputs of the node come from the Graph Output Nodes.
#### External Call Node
Calls a function in the external library that is executing Rivet.
#### Code Node
Executes arbitrary JavaScript code. Takes in one input and has one output.
outgoingConnections:
- output->"Prompt" -ELvIeQcb0AtnN6y0Y4w9/rivet
visualData: 845/412/300/4
7zpW_cdTXlsQbF5nNcgKP:
metadata:
description: ""
id: 7zpW_cdTXlsQbF5nNcgKP
name: "RA - Command: ASK_QUESTION_ABOUT_FILE"
nodes:
'[2338y8qNrzrbfDmzXJvhr]:chunk "Chunk"':
data:
model: gpt-4
numTokensPerChunk: 4096
overlap: 0
useModelInput: false
outgoingConnections:
- chunks->"Text" nELWKzIKfsG5PysjF-cSg/contents
- count->"Text" BiOEV7VKd8ZRQz8vwM9Ng/count
- count->"Text" gpA-l85r9DUJnZux3JRjt/count
- count->"Text" nELWKzIKfsG5PysjF-cSg/count
- indexes->"Text" gpA-l85r9DUJnZux3JRjt/index
- indexes->"Text" nELWKzIKfsG5PysjF-cSg/index
visualData: 1200.8357446452283/346.2666438124874/200/23
'[2_eg1SZ7lUW33gIXYfrVK]:graphInput "Graph Input"':
data:
dataType: object
id: arguments
useDefaultValueInput: false
outgoingConnections:
- data->"Extract Object Path" ei3qRQVhPSrVddaO5bU-U/object
- data->"Extract Object Path" m9kiRPWzz-lraxQy_98B8/object
visualData: 239/357/300/1
'[BiOEV7VKd8ZRQz8vwM9Ng]:text "Text"':
data:
text: >-
A question was asked about the file {{file_name}}. It was chunked
into {{count}} chunks, and the question was asked for each chunk.
The results are:
{{results}}
You must now combine these answers into a single answer for this question: {{question}}
outgoingConnections:
- output->"Chat" rIyqK6UuYqLaIO23zgYM8/prompt
visualData: 2459.7712182931887/307.24034013325036/300/31
'[LbDS-ehJ0WcfC2CipqmJ-]:graphOutput "Graph Output"':
data:
dataType: string
id: output
visualData: 3124.0951810571714/389.4792142403751/300/32
'[Thf0b7P0ZBeb7ILxkuzVU]:text "Text"':
data:
text: You are a code file analyzer and question answerer. You are given the
contents of a file of code, and you are given a question about the
code. You directly answer the question given, with as much detail
as possible. However, you do not output code unless you are
explicitly asked to reply with some code. Otherwise, you reply
with plain English only.
outgoingConnections:
- output->"Chat" jw7ZxX561t7Q_TYnVDEMW/systemPrompt
- output->"Chat" rIyqK6UuYqLaIO23zgYM8/systemPrompt
visualData: 1309.0936877506306/104.97158147670746/300/18
'[ei3qRQVhPSrVddaO5bU-U]:extractObjectPath "Extract Object Path"':
data:
path: $.question
usePathInput: false
outgoingConnections:
- match->"Text" BiOEV7VKd8ZRQz8vwM9Ng/question
- match->"Text" nELWKzIKfsG5PysjF-cSg/question
visualData: 611.4508579916097/714.4118633508281/250/21
'[gpA-l85r9DUJnZux3JRjt]:text "Text"':
data:
text: |-
Chunk {{index}}/{{count}} answer:
{{answer}}
isSplitRun: true
outgoingConnections:
- output->"Text" BiOEV7VKd8ZRQz8vwM9Ng/results
visualData: 2049.0387588414633/427.4218704794111/300/30
'[jw7ZxX561t7Q_TYnVDEMW]:chat "Chat"':
data:
cache: false
enableFunctionUse: false
frequencyPenalty: 0
maxTokens: 1024
model: gpt-4-0613
presencePenalty: 0
stop: ""
temperature: 0.3
top_p: 1
useFrequencyPenaltyInput: false
useMaxTokensInput: false
useModelInput: false
usePresencePenaltyInput: false
useStop: false
useStopInput: false
useTemperatureInput: false
useTopP: false
useTopPInput: false
useUseTopPInput: false
useUserInput: false
isSplitRun: true
outgoingConnections:
- response->"Text" gpA-l85r9DUJnZux3JRjt/answer
visualData: 1797.1530762644013/444.63882974839595/200/25
'[lRV5SdMeGyEUVDkTN31ga]:readFile "Read File"':
data:
errorOnMissingFile: false
path: ""
usePathInput: true
outgoingConnections:
- content->"Chunk" 2338y8qNrzrbfDmzXJvhr/input
visualData: 907.7722794413804/405.417269725349/250/12
'[m9kiRPWzz-lraxQy_98B8]:extractObjectPath "Extract Object Path"':
data:
path: $.path
usePathInput: false
outgoingConnections:
- match->"Read File" lRV5SdMeGyEUVDkTN31ga/path
- match->"Text" BiOEV7VKd8ZRQz8vwM9Ng/file_name
- match->"Text" nELWKzIKfsG5PysjF-cSg/file_name
visualData: 613/365/250/2
'[nELWKzIKfsG5PysjF-cSg]:text "Text"':
data:
text: >-
Here is chunk {{index}}/{{count}} of a code file:
```
// {{file_name}} ({{index}}/{{count}})
{{contents}}
```
I have this question about the file: {{question}}
Answer to the best of your ability about this particular chunk of the file. If this chunk of the file does not answer the question, then state that this chunk of the file does not have a sufficient answer to the question.
If the file does not exist, instruct the AI calling you that they should use READ_DIRECTORY and then call ASK_QUESTION_ABOUT_FILE again with the correct path.
isSplitRun: true
outgoingConnections:
- output->"Chat" jw7ZxX561t7Q_TYnVDEMW/prompt
visualData: 1446.7677235772446/307.9993433915212/300/24
'[rIyqK6UuYqLaIO23zgYM8]:chat "Chat"':
data:
cache: false
enableFunctionUse: false
frequencyPenalty: 0
maxTokens: 1024
model: gpt-4-0613
presencePenalty: 0
stop: ""
temperature: 0.5
top_p: 1
useFrequencyPenaltyInput: false
useMaxTokensInput: false
useModelInput: false
usePresencePenaltyInput: false
useStop: false
useStopInput: false
useTemperatureInput: false
useTopP: false
useTopPInput: false
useUseTopPInput: false
useUserInput: false
outgoingConnections:
- response->"Graph Output" LbDS-ehJ0WcfC2CipqmJ-/value
visualData: 2868.4447571236283/398.6248545653415/200/29
9cRiigw77WY0G_wWDYp4Z:
metadata:
description: ""
id: 9cRiigw77WY0G_wWDYp4Z
name: RA - Exec Command
nodes:
'[1e5oUEYX0KeJz114J2SRQ]:subGraph "Subgraph"':
data:
graphId: g_lk18P0-BSirYNE2qGAa
outgoingConnections:
- output->"Coalesce" S-OKN_ugeBGnO3Ud4ks6N/input5
visualData: 1509.9285357359627/645.4094053848103/300/23
'[6-rZH-2eS8k3Ez0ygZgJn]:subGraph "Subgraph"':
data:
graphId: sgqPsMPVjV-hHvsAloa3y
outgoingConnections:
- output->"Coalesce" S-OKN_ugeBGnO3Ud4ks6N/input2
visualData: 1508.6082012202514/212.33968423150543/300/17
'[6eBKxYuyo2HBelLbBCBPY]:match "Match"':
data:
caseCount: 5
cases:
- LIST_FILES_IN_DIRECTORY
- READ_FILE
- ASK_QUESTION_ABOUT_FILE
- REMEMBER_INFO
- RECALL_INFO
outgoingConnections:
- case1->"If" HAqjF_Aqyiy8VjSaIdEOU/if
- case2->"If" F7NBKP3NaBGQSztiVle1n/if
- case3->"If" KtUEcTsgXn45Bx3A0VTeD/if
- case4->"If" NNy8ZDMLOw45F_obP7Yfc/if
- case5->"If" VGAj7Qwxgvf3Iz296cxfd/if
- unmatched->"If" wJMY-M1cWCp5fp6z5WU98/if
visualData: 952.9784825017156/161.27627193412414/300/9
'[F7NBKP3NaBGQSztiVle1n]:if "If"':
outgoingConnections:
- output->"Subgraph" 6-rZH-2eS8k3Ez0ygZgJn/arguments
visualData: 1350.055268436117/226.14086450213313/125/16
'[HAqjF_Aqyiy8VjSaIdEOU]:if "If"':
outgoingConnections:
- output->"Subgraph" WoDTNQabmc1rZf2jFKGSK/arguments
visualData: 1350.055268436117/89.17149806221684/125/11
'[KtUEcTsgXn45Bx3A0VTeD]:if "If"':
outgoingConnections:
- output->"Subgraph" dzs2pgnFjSyTESOtah5Ct/arguments
visualData: 1343.4535958575607/361.7898964263381/125/18
'[NNy8ZDMLOw45F_obP7Yfc]:if "If"':
outgoingConnections:
- output->"Subgraph" xfdWAxd2JfuEbN1ZBgMC5/arguments
visualData: 1343.4535958575607/513.2829425390786/125/20
'[S-OKN_ugeBGnO3Ud4ks6N]:coalesce "Coalesce"':
outgoingConnections:
- output->"Prompt" eEXAsNDCNSOuZyEHA8EOH/results
visualData: 2036.7420075047696/15.609841390522348/150/15
'[SxQDo-a8rRHE1wic8UNx1]:graphInput "Graph Input"':
data:
dataType: object
id: command
useDefaultValueInput: false
outgoingConnections:
- data->"Name" gQ9J8ptvSpdHjC0K_0Bk0/object
- data->"Name" hy2vJwbBEwYKCjMs2OMTP/object
visualData: 272/386/300/1
'[VGAj7Qwxgvf3Iz296cxfd]:if "If"':
outgoingConnections:
- output->"Subgraph" 1e5oUEYX0KeJz114J2SRQ/arguments
visualData: 1343.4535958575607/638.3692983375932/125/22
'[WoDTNQabmc1rZf2jFKGSK]:subGraph "Subgraph"':
data:
graphId: lXUC_1uq9nRw3WNXCkpdB
outgoingConnections:
- output->"Coalesce" S-OKN_ugeBGnO3Ud4ks6N/input1
visualData: 1507.9088279784255/73.58102304569259/300/12
'[dzs2pgnFjSyTESOtah5Ct]:subGraph "Subgraph"':
data:
graphId: 7zpW_cdTXlsQbF5nNcgKP
outgoingConnections:
- output->"Coalesce" S-OKN_ugeBGnO3Ud4ks6N/input3
visualData: 1515.2098737988078/357.57648095974787/300/19
'[eEXAsNDCNSOuZyEHA8EOH]:prompt "Prompt"':
data:
enableFunctionCall: false
name: SYSTEM INFORMATION
promptText: |-
Results for command {{command_name}}:
"""
{{results}}
"""
type: user
useTypeInput: false
outgoingConnections:
- output->"Graph Output" z-12fYeNh0c6lZAGDQC5i/value
visualData: 2254.428902438278/-109.11378005033785/250/24
'[gQ9J8ptvSpdHjC0K_0Bk0]:extractObjectPath "Name"':
data:
path: |
$.arguments
usePathInput: false
outgoingConnections:
- match->"If" F7NBKP3NaBGQSztiVle1n/value
- match->"If" HAqjF_Aqyiy8VjSaIdEOU/value
- match->"If" KtUEcTsgXn45Bx3A0VTeD/value
- match->"If" NNy8ZDMLOw45F_obP7Yfc/value
- match->"If" VGAj7Qwxgvf3Iz296cxfd/value
visualData: 719/481/153/5
'[hy2vJwbBEwYKCjMs2OMTP]:extractObjectPath "Name"':
data:
path: |
$.name
usePathInput: false
outgoingConnections:
- match->"If" wJMY-M1cWCp5fp6z5WU98/value
- match->"Match" 6eBKxYuyo2HBelLbBCBPY/input
- match->"Prompt" eEXAsNDCNSOuZyEHA8EOH/command_name
visualData: 719/248/153/4
'[wJMY-M1cWCp5fp6z5WU98]:if "If"':
outgoingConnections:
- output->"Text" zAIWmNhfJj_h3xPx0kewP/command_name
visualData: 1337.7457048662893/783.8203790315147/125/32
'[xfdWAxd2JfuEbN1ZBgMC5]:subGraph "Subgraph"':
data:
graphId: pgbl6cyJ6kZWZwEb0o7rz
outgoingConnections:
- output->"Coalesce" S-OKN_ugeBGnO3Ud4ks6N/input4
visualData: 1512.5692047673851/500.1726086565678/300/21
'[z-12fYeNh0c6lZAGDQC5i]:graphOutput "Graph Output"':
data:
dataType: string
id: command_output
visualData: 2622.320441954619/-41.23906807529085/300/27
'[zAIWmNhfJj_h3xPx0kewP]:text "Text"':
data:
text: Unknown command {{command_name}}! Please refer to the system commands list
to see all available commands.
outgoingConnections:
- output->"Coalesce" S-OKN_ugeBGnO3Ud4ks6N/input6
visualData: 1501.6714910083379/787.9185236850659/300/31
BCH2-JTaOfU7yrJ1GQRhL:
metadata:
description: ""
id: BCH2-JTaOfU7yrJ1GQRhL
name: Extract List Items
nodes:
'[0ciq8PeUozuVOAQ8D6lQ_]:ifElse "If/Else"':
outgoingConnections:
- output->"Graph Output" N-LYZkuLW9qvIFobDpRo5/value
visualData: 1387/387/125/18
'[FClS4P3cvRs8mZHieN9VO]:match "Match"':
data:
caseCount: 1
cases:
- \*
outgoingConnections:
- case1->"Extract Regex" uscIqNzkwiFK1zWdxydCj/input
- case1->"If/Else" 0ciq8PeUozuVOAQ8D6lQ_/if
visualData: 663/451/300/12
'[JXxrnJnWCwYxJbnlgh_KM]:graphInput "Graph Input"':
data:
dataType: string
id: text
outgoingConnections:
- data->"Match" FClS4P3cvRs8mZHieN9VO/input
visualData: 288/323/300/8
'[MGGvYxorqqDFpvGmFLWmw]:text "Text"':
data:
text: ""
outgoingConnections:
- output->"If/Else" 0ciq8PeUozuVOAQ8D6lQ_/false
visualData: 688/648/154/16
'[N-LYZkuLW9qvIFobDpRo5]:graphOutput "Graph Output"':
data:
dataType: string[]
id: items
visualData: 1625/402/300/14
'[uscIqNzkwiFK1zWdxydCj]:extractRegex "Extract Regex"':
data:
errorOnFailed: true
regex: \* (.+)
useRegexInput: false
outgoingConnections:
- matches->"If/Else" 0ciq8PeUozuVOAQ8D6lQ_/true
visualData: 1035/383/250/13
DBSqt91CfAs1dewM-IhgT:
metadata:
description: ""
id: DBSqt91CfAs1dewM-IhgT
name: RA - Analyze Until Done
nodes:
'[-r_2kaeMS-ZYUXhsCObVV]:loopController "Loop Controller"':
data:
maxIterations: 100
outgoingConnections:
- break->"Extract Object Path" A1QAexk0N1yzfWytjwrlK/object
- break->"Extract Object Path" Vd9CYlLETL0sAr2X73_lM/object
- output1->"Subgraph" vLyGV7ovbUYwCpnVv_YTv/current_messages
visualData: 1903.2274878891517/693.1500148714374/250/null
'[2r-NqWWMhUJ2vG07yyGQe]:text "Text"':
data:
text: "false"
outgoingConnections:
- output->"If/Else" V50VnTrUvH3Xga1LRYKWS/false
visualData: 3206.602702252145/1085.4509610314976/300/null
'[A1QAexk0N1yzfWytjwrlK]:extractObjectPath "Extract Object Path"':
data:
path: $[1]
usePathInput: false
outgoingConnections:
- match->"Graph Output" T5dFxOs_MHn0bLFC9aQDN/value
visualData: 2262.08154047184/377.1058722189694/250/99
'[EUuTrue5VkIy2ws195G0o]:match "Match"':
data:
caseCount: 1
cases:
- RECALL_INFO
outgoingConnections:
- case1->"If/Else" V50VnTrUvH3Xga1LRYKWS/if
visualData: 3025.232574383944/603.9840477327783/300/95
'[Stx1H2iniItB-FoT4f2bS]:extractYaml "Extract YAML"':
data:
objectPath: $.systemCommands[0].name
rootPropertyName: systemCommands
outgoingConnections:
- output->"Match" EUuTrue5VkIy2ws195G0o/input
visualData: 2683.4297003524184/613.8913774148516/250/94
'[T5dFxOs_MHn0bLFC9aQDN]:graphOutput "Graph Output"':
data:
dataType: string
id: chat_output
visualData: 2687.6193939503723/356.4100212762155/300/101
'[V50VnTrUvH3Xga1LRYKWS]:ifElse "If/Else"':
outgoingConnections:
- output->"Loop Controller" -r_2kaeMS-ZYUXhsCObVV/continue
visualData: 3563.9318877494343/567.0045981448056/125/97
'[Va4d_NrMAW2V8LMdg5WIb]:text "Text"':
data:
text: "true"
outgoingConnections:
- output->"If/Else" V50VnTrUvH3Xga1LRYKWS/true
visualData: 3208.1979218302577/870.0963179862564/300/null
'[Vd9CYlLETL0sAr2X73_lM]:extractObjectPath "Extract Object Path"':
data:
path: $[0]
usePathInput: false
outgoingConnections:
- match->"Graph Output" xCY6ItteekfA9ycKqnT1Q/value
visualData: 2247.684285398584/163.36755714024667/250/98
'[_fzwpRZw_bUBIul-X2mMs]:prompt "Prompt"':
data:
enableFunctionCall: false
name: SYSTEM INFORMATION
promptText: Next, talk about the next thing you will be analyzing, and run
RECALL_INFO one or more times to see what you have already
analyzed and remembered. Be as descriptive and verbose as possible
in your topic argument, because the more information you give, the
better the relevant memories can be identified.
type: user
useTypeInput: false
visualData: 1650.9191658546888/358.25772586434255/250/93
'[oW8bIRG1wJNWkXl-NS_qe]:prompt "Prompt"':
data:
enableFunctionCall: false
name: SYSTEM INFORMATION
promptText: >-
What is the next thing you plan on doing? Run RECALL_INFO first
before you run any other command.
If you have already run RECALL_INFO for the next thing you plan on doing, and you do not have any memories for the task, you may run a command other than RECALL_INFO to further your memories.
type: user
useTypeInput: false
outgoingConnections:
- output->"Subgraph" vLyGV7ovbUYwCpnVv_YTv/prompt_message
visualData: 1903.556072747556/496.03363823409995/250/92
'[tSUsLaivP4rtiuLalg8Rn]:graphInput "Graph Input"':
data:
dataType: any
id: current_messages
outgoingConnections:
- data->"Loop Controller" -r_2kaeMS-ZYUXhsCObVV/input1Default
visualData: 1361.7278909749107/715.2333074499701/300/87
'[vLyGV7ovbUYwCpnVv_YTv]:subGraph "Subgraph"':
data:
graphId: 49ADNSJiXKFRvgaRMhFvP
outgoingConnections:
- chat_output->"Extract YAML" Stx1H2iniItB-FoT4f2bS/input
- chat_output->"Loop Controller" -r_2kaeMS-ZYUXhsCObVV/input2
- new_messages->"Loop Controller" -r_2kaeMS-ZYUXhsCObVV/input1
visualData: 2292.6967321450957/710.3927639039126/300/90
'[xCY6ItteekfA9ycKqnT1Q]:graphOutput "Graph Output"':
data:
dataType: chat-message[]
id: new_messages
visualData: 2699.672402408892/135.11899467921754/300/100
HRMMlTL5W-Wau-f7nLLEh:
metadata:
description: ""
id: HRMMlTL5W-Wau-f7nLLEh
name: RA - System Prompt
nodes:
'[fFj_MIJQSxY4S5DIBtnFk]:text "Text"':
data:
text: >-
# You
You are a source code analyzer. A user will give you a path to a repository. You have a set of system commands that you can then use to interact with the file system and other APIs in order to perform actions. You will go through and interatively analyze the repository, after each command you will update your analysis (either refining it as you have learned new information, or adding to your analysis in some way).
You store your complete analysis using a memory with the ID "analysis".
You frequently check your memory to see if you have already accomplished things.
Before reading or asking questions about any files, you always run RECALL_INFO first to see if you have already done it.
You always reply with a system command to interact with the System. However, you include text before your system command explaining your current thoughts.
There may only be at most one `systemCommands` block in your responses.
{{system_commands}}
outgoingConnections:
- output->"Graph Output" okr0iIB5gCjEG7zNOfDkP/value
visualData: 578/287/300/null
'[hV6TCfunJysRgAgjMK1nj]:subGraph "Subgraph"':
data:
graphId: cWbUqJZE2osNm42Q2ewC9
outgoingConnections:
- output->"Text" fFj_MIJQSxY4S5DIBtnFk/system_commands
visualData: 179.6969610905414/450.1803932480233/300/53
'[okr0iIB5gCjEG7zNOfDkP]:graphOutput "Graph Output"':
data:
dataType: string
id: system_prompt
visualData: 1078/287/300/null
HXjZhpWO0hluMiDY6pneE:
metadata:
description: ""
id: HXjZhpWO0hluMiDY6pneE
name: Digest File
nodes:
'[-c9ebiNnhmYedQN8Wo8hw]:chat "Chat"':
data:
cache: true
frequencyPenalty: 0
maxTokens: 1024
model: gpt-3.5-turbo
presencePenalty: 0
stop: ""
temperature: 0
top_p: 1
useFrequencyPenaltyInput: false
useMaxTokensInput: false
useModelInput: false
usePresencePenaltyInput: false
useStop: false
useStopInput: false
useTemperatureInput: false
useTopP: false
useTopPInput: false
useUseTopPInput: false
outgoingConnections:
- response->"Text" IYT_PxYTFx5P4zMzhOqn_/name
- response->"Text" IYT_PxYTFx5P4zMzhOqn_/responses
visualData: 1785.4317276583695/362.6631476479146/200/52
'[7VrEtnVAjfEeOfFVEBu_B]:graphOutput "Graph Output"':
data:
dataType: string
id: digest
visualData: 3540.1001678580496/818.9951954575467/300/96
'[BykrT115qLE_8iVjmBCAp]:text "Text"':
data:
text: Please tell me what the responsibility for this file is with respect to
other files. Be extremely thorough in your response. Basically, if
another person asked you "what is the purpose of this file? What
does it do?", this would be your detailed response.
outgoingConnections:
- output->"Assemble Prompt" iNgsHuW1d-8xDv1A21bXK/message3
- output->"Chat" _Gs7cTnnvcCHLxF8W5mFD/message3
visualData: 971.7770959717168/1315.8146243045526/300/94
'[CNa2GH7LRJIXnWGt366QH]:subGraph "Extract List Items"':