git-coco 0.14.1 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.esm.mjs +662 -770
- package/dist/index.js +662 -770
- package/package.json +3 -1
package/dist/index.esm.mjs
CHANGED
|
@@ -50,6 +50,13 @@ import { Writable } from 'node:stream';
|
|
|
50
50
|
import readline$1 from 'node:readline';
|
|
51
51
|
import * as readline from 'readline';
|
|
52
52
|
|
|
53
|
+
// This file is auto-generated - DO NOT EDIT
|
|
54
|
+
/* eslint-disable */
|
|
55
|
+
/**
|
|
56
|
+
* Current build version from package.json
|
|
57
|
+
*/
|
|
58
|
+
const BUILD_VERSION = "0.14.3";
|
|
59
|
+
|
|
53
60
|
const isInteractive = (config) => {
|
|
54
61
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
55
62
|
};
|
|
@@ -68,7 +75,7 @@ const bannerWithHeader = (banner) => {
|
|
|
68
75
|
└────┘`);
|
|
69
76
|
};
|
|
70
77
|
const USAGE_BANNER = chalk.green(`${LOGO}
|
|
71
|
-
${chalk.bgGreen(`\xa0v${
|
|
78
|
+
${chalk.bgGreen(`\xa0v${BUILD_VERSION}\xa0`) }
|
|
72
79
|
`);
|
|
73
80
|
const getCommandUsageHeader = (command) => {
|
|
74
81
|
return chalk.green(`${USAGE_BANNER}\n${chalk.white('Command:')}\n\xa0\xa0\xa0\xa0\xa0 $0 ${chalk.greenBright(command)} [options]`);
|
|
@@ -254,6 +261,11 @@ const DEFAULT_OLLAMA_LLM_SERVICE = {
|
|
|
254
261
|
*/
|
|
255
262
|
function getDefaultServiceConfigFromAlias(provider, model) {
|
|
256
263
|
switch (provider) {
|
|
264
|
+
case 'anthropic':
|
|
265
|
+
return {
|
|
266
|
+
...DEFAULT_OPENAI_LLM_SERVICE,
|
|
267
|
+
model: model || DEFAULT_OPENAI_LLM_SERVICE.model,
|
|
268
|
+
};
|
|
257
269
|
case 'ollama':
|
|
258
270
|
return {
|
|
259
271
|
...DEFAULT_OLLAMA_LLM_SERVICE,
|
|
@@ -515,8 +527,15 @@ function loadIgnore(config) {
|
|
|
515
527
|
return config;
|
|
516
528
|
}
|
|
517
529
|
|
|
518
|
-
//
|
|
530
|
+
// This file is auto-generated - DO NOT EDIT
|
|
531
|
+
/* eslint-disable */
|
|
532
|
+
/**
|
|
533
|
+
* Schema ID for JSON validation
|
|
534
|
+
*/
|
|
519
535
|
const SCHEMA_PUBLIC_URL = "http://git-co.co/schema.json";
|
|
536
|
+
/**
|
|
537
|
+
* Generated JSON schema
|
|
538
|
+
*/
|
|
520
539
|
const schema$1 = {
|
|
521
540
|
"$id": "http://git-co.co/schema.json",
|
|
522
541
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
@@ -532,14 +551,17 @@ const schema$1 = {
|
|
|
532
551
|
"interactive": {
|
|
533
552
|
"type": "boolean"
|
|
534
553
|
},
|
|
535
|
-
"help": {
|
|
536
|
-
"type": "boolean"
|
|
537
|
-
},
|
|
538
554
|
"verbose": {
|
|
539
555
|
"type": "boolean",
|
|
540
556
|
"description": "Enable verbose logging.",
|
|
541
557
|
"default": false
|
|
542
558
|
},
|
|
559
|
+
"version": {
|
|
560
|
+
"type": "boolean"
|
|
561
|
+
},
|
|
562
|
+
"help": {
|
|
563
|
+
"type": "boolean"
|
|
564
|
+
},
|
|
543
565
|
"mode": {
|
|
544
566
|
"type": "string",
|
|
545
567
|
"enum": [
|
|
@@ -606,6 +628,9 @@ const schema$1 = {
|
|
|
606
628
|
},
|
|
607
629
|
{
|
|
608
630
|
"$ref": "#/definitions/OllamaLLMService"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"$ref": "#/definitions/AnthropicLLMService"
|
|
609
634
|
}
|
|
610
635
|
]
|
|
611
636
|
},
|
|
@@ -620,321 +645,151 @@ const schema$1 = {
|
|
|
620
645
|
"$ref": "#/definitions/LLMModel"
|
|
621
646
|
},
|
|
622
647
|
"fields": {
|
|
623
|
-
"
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
"
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
"items": {
|
|
637
|
-
"type": "string"
|
|
638
|
-
}
|
|
639
|
-
},
|
|
640
|
-
"metadata": {
|
|
641
|
-
"type": "object",
|
|
642
|
-
"additionalProperties": {}
|
|
643
|
-
},
|
|
644
|
-
"maxConcurrency": {
|
|
645
|
-
"type": "number",
|
|
646
|
-
"description": "The maximum number of concurrent calls that can be made. Defaults to `Infinity`, which means no limit."
|
|
647
|
-
},
|
|
648
|
-
"maxRetries": {
|
|
649
|
-
"type": "number",
|
|
650
|
-
"description": "The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6."
|
|
651
|
-
},
|
|
652
|
-
"onFailedAttempt": {
|
|
653
|
-
"$ref": "#/definitions/FailedAttemptHandler",
|
|
654
|
-
"description": "Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable."
|
|
655
|
-
},
|
|
656
|
-
"callbackManager": {
|
|
657
|
-
"$ref": "#/definitions/CallbackManager",
|
|
658
|
-
"deprecated": "Use `callbacks` instead"
|
|
659
|
-
},
|
|
660
|
-
"cache": {
|
|
661
|
-
"anyOf": [
|
|
662
|
-
{
|
|
663
|
-
"$ref": "#/definitions/BaseCache"
|
|
664
|
-
},
|
|
665
|
-
{
|
|
666
|
-
"type": "boolean"
|
|
667
|
-
}
|
|
668
|
-
]
|
|
669
|
-
},
|
|
670
|
-
"concurrency": {
|
|
671
|
-
"type": "number",
|
|
672
|
-
"deprecated": "Use `maxConcurrency` instead"
|
|
673
|
-
},
|
|
674
|
-
"bestOf": {
|
|
675
|
-
"type": "number",
|
|
676
|
-
"description": "Generates `bestOf` completions server side and returns the \"best\""
|
|
677
|
-
},
|
|
678
|
-
"batchSize": {
|
|
679
|
-
"type": "number",
|
|
680
|
-
"description": "Batch size to use when passing multiple documents to generate"
|
|
681
|
-
},
|
|
682
|
-
"temperature": {
|
|
683
|
-
"type": "number",
|
|
684
|
-
"description": "Sampling temperature to use"
|
|
685
|
-
},
|
|
686
|
-
"maxTokens": {
|
|
687
|
-
"type": "number",
|
|
688
|
-
"description": "Maximum number of tokens to generate in the completion. -1 returns as many tokens as possible given the prompt and the model's maximum context size."
|
|
689
|
-
},
|
|
690
|
-
"topP": {
|
|
691
|
-
"type": "number",
|
|
692
|
-
"description": "Total probability mass of tokens to consider at each step"
|
|
693
|
-
},
|
|
694
|
-
"frequencyPenalty": {
|
|
695
|
-
"type": "number",
|
|
696
|
-
"description": "Penalizes repeated tokens according to frequency"
|
|
697
|
-
},
|
|
698
|
-
"presencePenalty": {
|
|
699
|
-
"type": "number",
|
|
700
|
-
"description": "Penalizes repeated tokens"
|
|
701
|
-
},
|
|
702
|
-
"n": {
|
|
703
|
-
"type": "number",
|
|
704
|
-
"description": "Number of completions to generate for each prompt"
|
|
705
|
-
},
|
|
706
|
-
"logitBias": {
|
|
707
|
-
"type": "object",
|
|
708
|
-
"additionalProperties": {
|
|
709
|
-
"type": "number"
|
|
710
|
-
},
|
|
711
|
-
"description": "Dictionary used to adjust the probability of specific tokens being generated"
|
|
712
|
-
},
|
|
713
|
-
"user": {
|
|
714
|
-
"type": "string",
|
|
715
|
-
"description": "Unique string identifier representing your end-user, which can help OpenAI to monitor and detect abuse."
|
|
716
|
-
},
|
|
717
|
-
"streaming": {
|
|
718
|
-
"type": "boolean",
|
|
719
|
-
"description": "Whether to stream the results or not. Enabling disables tokenUsage reporting"
|
|
720
|
-
},
|
|
721
|
-
"streamUsage": {
|
|
722
|
-
"type": "boolean",
|
|
723
|
-
"description": "Whether or not to include token usage data in streamed chunks.",
|
|
724
|
-
"default": true
|
|
725
|
-
},
|
|
726
|
-
"modelName": {
|
|
727
|
-
"type": "string",
|
|
728
|
-
"description": "Model name to use Alias for `model`"
|
|
729
|
-
},
|
|
730
|
-
"model": {
|
|
731
|
-
"type": "string",
|
|
732
|
-
"description": "Model name to use"
|
|
733
|
-
},
|
|
734
|
-
"modelKwargs": {
|
|
735
|
-
"type": "object",
|
|
736
|
-
"description": "Holds any additional parameters that are valid to pass to {@link * https://platform.openai.com/docs/api-reference/completions/create | } * `openai.createCompletion`} that are not explicitly specified on this class."
|
|
737
|
-
},
|
|
738
|
-
"stop": {
|
|
739
|
-
"type": "array",
|
|
740
|
-
"items": {
|
|
741
|
-
"type": "string"
|
|
742
|
-
},
|
|
743
|
-
"description": "List of stop words to use when generating Alias for `stopSequences`"
|
|
744
|
-
},
|
|
745
|
-
"stopSequences": {
|
|
746
|
-
"type": "array",
|
|
747
|
-
"items": {
|
|
748
|
-
"type": "string"
|
|
749
|
-
},
|
|
750
|
-
"description": "List of stop words to use when generating"
|
|
751
|
-
},
|
|
752
|
-
"timeout": {
|
|
753
|
-
"type": "number",
|
|
754
|
-
"description": "Timeout to use when making requests to OpenAI."
|
|
755
|
-
},
|
|
756
|
-
"openAIApiKey": {
|
|
757
|
-
"type": "string",
|
|
758
|
-
"description": "API key to use when making requests to OpenAI. Defaults to the value of `OPENAI_API_KEY` environment variable. Alias for `apiKey`"
|
|
759
|
-
},
|
|
760
|
-
"apiKey": {
|
|
761
|
-
"type": "string",
|
|
762
|
-
"description": "API key to use when making requests to OpenAI. Defaults to the value of `OPENAI_API_KEY` environment variable."
|
|
763
|
-
}
|
|
648
|
+
"type": "object",
|
|
649
|
+
"additionalProperties": false,
|
|
650
|
+
"properties": {
|
|
651
|
+
"verbose": {
|
|
652
|
+
"type": "boolean"
|
|
653
|
+
},
|
|
654
|
+
"callbacks": {
|
|
655
|
+
"$ref": "#/definitions/Callbacks"
|
|
656
|
+
},
|
|
657
|
+
"tags": {
|
|
658
|
+
"type": "array",
|
|
659
|
+
"items": {
|
|
660
|
+
"type": "string"
|
|
764
661
|
}
|
|
765
662
|
},
|
|
766
|
-
{
|
|
663
|
+
"metadata": {
|
|
767
664
|
"type": "object",
|
|
768
|
-
"additionalProperties":
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
"maxRetries": {
|
|
791
|
-
"type": "number",
|
|
792
|
-
"description": "The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6."
|
|
793
|
-
},
|
|
794
|
-
"onFailedAttempt": {
|
|
795
|
-
"$ref": "#/definitions/FailedAttemptHandler",
|
|
796
|
-
"description": "Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable."
|
|
797
|
-
},
|
|
798
|
-
"callbackManager": {
|
|
799
|
-
"$ref": "#/definitions/CallbackManager",
|
|
800
|
-
"deprecated": "Use `callbacks` instead"
|
|
801
|
-
},
|
|
802
|
-
"cache": {
|
|
803
|
-
"anyOf": [
|
|
804
|
-
{
|
|
805
|
-
"$ref": "#/definitions/BaseCache"
|
|
806
|
-
},
|
|
807
|
-
{
|
|
808
|
-
"type": "boolean"
|
|
809
|
-
}
|
|
810
|
-
]
|
|
811
|
-
},
|
|
812
|
-
"concurrency": {
|
|
813
|
-
"type": "number",
|
|
814
|
-
"deprecated": "Use `maxConcurrency` instead"
|
|
815
|
-
},
|
|
816
|
-
"embeddingOnly": {
|
|
817
|
-
"type": "boolean"
|
|
818
|
-
},
|
|
819
|
-
"f16KV": {
|
|
820
|
-
"type": "boolean"
|
|
821
|
-
},
|
|
822
|
-
"frequencyPenalty": {
|
|
823
|
-
"type": "number"
|
|
824
|
-
},
|
|
825
|
-
"headers": {
|
|
826
|
-
"type": "object",
|
|
827
|
-
"additionalProperties": {
|
|
828
|
-
"type": "string"
|
|
829
|
-
}
|
|
830
|
-
},
|
|
831
|
-
"keepAlive": {
|
|
832
|
-
"type": "string"
|
|
833
|
-
},
|
|
834
|
-
"logitsAll": {
|
|
835
|
-
"type": "boolean"
|
|
836
|
-
},
|
|
837
|
-
"lowVram": {
|
|
838
|
-
"type": "boolean"
|
|
839
|
-
},
|
|
840
|
-
"mainGpu": {
|
|
841
|
-
"type": "number"
|
|
842
|
-
},
|
|
843
|
-
"model": {
|
|
844
|
-
"type": "string"
|
|
845
|
-
},
|
|
846
|
-
"baseUrl": {
|
|
847
|
-
"type": "string"
|
|
848
|
-
},
|
|
849
|
-
"mirostat": {
|
|
850
|
-
"type": "number"
|
|
851
|
-
},
|
|
852
|
-
"mirostatEta": {
|
|
853
|
-
"type": "number"
|
|
854
|
-
},
|
|
855
|
-
"mirostatTau": {
|
|
856
|
-
"type": "number"
|
|
857
|
-
},
|
|
858
|
-
"numBatch": {
|
|
859
|
-
"type": "number"
|
|
860
|
-
},
|
|
861
|
-
"numCtx": {
|
|
862
|
-
"type": "number"
|
|
863
|
-
},
|
|
864
|
-
"numGpu": {
|
|
865
|
-
"type": "number"
|
|
866
|
-
},
|
|
867
|
-
"numGqa": {
|
|
868
|
-
"type": "number"
|
|
869
|
-
},
|
|
870
|
-
"numKeep": {
|
|
871
|
-
"type": "number"
|
|
872
|
-
},
|
|
873
|
-
"numPredict": {
|
|
874
|
-
"type": "number"
|
|
875
|
-
},
|
|
876
|
-
"numThread": {
|
|
877
|
-
"type": "number"
|
|
878
|
-
},
|
|
879
|
-
"penalizeNewline": {
|
|
880
|
-
"type": "boolean"
|
|
881
|
-
},
|
|
882
|
-
"presencePenalty": {
|
|
883
|
-
"type": "number"
|
|
884
|
-
},
|
|
885
|
-
"repeatLastN": {
|
|
886
|
-
"type": "number"
|
|
887
|
-
},
|
|
888
|
-
"repeatPenalty": {
|
|
889
|
-
"type": "number"
|
|
890
|
-
},
|
|
891
|
-
"ropeFrequencyBase": {
|
|
892
|
-
"type": "number"
|
|
893
|
-
},
|
|
894
|
-
"ropeFrequencyScale": {
|
|
895
|
-
"type": "number"
|
|
896
|
-
},
|
|
897
|
-
"temperature": {
|
|
898
|
-
"type": "number"
|
|
899
|
-
},
|
|
900
|
-
"stop": {
|
|
901
|
-
"type": "array",
|
|
902
|
-
"items": {
|
|
903
|
-
"type": "string"
|
|
904
|
-
}
|
|
905
|
-
},
|
|
906
|
-
"tfsZ": {
|
|
907
|
-
"type": "number"
|
|
908
|
-
},
|
|
909
|
-
"topK": {
|
|
910
|
-
"type": "number"
|
|
911
|
-
},
|
|
912
|
-
"topP": {
|
|
913
|
-
"type": "number"
|
|
914
|
-
},
|
|
915
|
-
"typicalP": {
|
|
916
|
-
"type": "number"
|
|
917
|
-
},
|
|
918
|
-
"useMLock": {
|
|
919
|
-
"type": "boolean"
|
|
920
|
-
},
|
|
921
|
-
"useMMap": {
|
|
922
|
-
"type": "boolean"
|
|
665
|
+
"additionalProperties": {}
|
|
666
|
+
},
|
|
667
|
+
"maxConcurrency": {
|
|
668
|
+
"type": "number",
|
|
669
|
+
"description": "The maximum number of concurrent calls that can be made. Defaults to `Infinity`, which means no limit."
|
|
670
|
+
},
|
|
671
|
+
"maxRetries": {
|
|
672
|
+
"type": "number",
|
|
673
|
+
"description": "The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6."
|
|
674
|
+
},
|
|
675
|
+
"onFailedAttempt": {
|
|
676
|
+
"$ref": "#/definitions/FailedAttemptHandler",
|
|
677
|
+
"description": "Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable."
|
|
678
|
+
},
|
|
679
|
+
"callbackManager": {
|
|
680
|
+
"$ref": "#/definitions/CallbackManager",
|
|
681
|
+
"deprecated": "Use `callbacks` instead"
|
|
682
|
+
},
|
|
683
|
+
"cache": {
|
|
684
|
+
"anyOf": [
|
|
685
|
+
{
|
|
686
|
+
"$ref": "#/definitions/BaseCache"
|
|
923
687
|
},
|
|
924
|
-
|
|
688
|
+
{
|
|
925
689
|
"type": "boolean"
|
|
926
|
-
},
|
|
927
|
-
"format": {
|
|
928
|
-
"$ref": "#/definitions/StringWithAutocomplete%3C%22json%22%3E"
|
|
929
690
|
}
|
|
930
|
-
|
|
691
|
+
]
|
|
692
|
+
},
|
|
693
|
+
"concurrency": {
|
|
694
|
+
"type": "number",
|
|
695
|
+
"deprecated": "Use `maxConcurrency` instead"
|
|
696
|
+
},
|
|
697
|
+
"bestOf": {
|
|
698
|
+
"type": "number",
|
|
699
|
+
"description": "Generates `bestOf` completions server side and returns the \"best\""
|
|
700
|
+
},
|
|
701
|
+
"batchSize": {
|
|
702
|
+
"type": "number",
|
|
703
|
+
"description": "Batch size to use when passing multiple documents to generate"
|
|
704
|
+
},
|
|
705
|
+
"temperature": {
|
|
706
|
+
"type": "number",
|
|
707
|
+
"description": "Sampling temperature to use"
|
|
708
|
+
},
|
|
709
|
+
"maxTokens": {
|
|
710
|
+
"type": "number",
|
|
711
|
+
"description": "Maximum number of tokens to generate in the completion. -1 returns as many tokens as possible given the prompt and the model's maximum context size."
|
|
712
|
+
},
|
|
713
|
+
"topP": {
|
|
714
|
+
"type": "number",
|
|
715
|
+
"description": "Total probability mass of tokens to consider at each step"
|
|
716
|
+
},
|
|
717
|
+
"frequencyPenalty": {
|
|
718
|
+
"type": "number",
|
|
719
|
+
"description": "Penalizes repeated tokens according to frequency"
|
|
720
|
+
},
|
|
721
|
+
"presencePenalty": {
|
|
722
|
+
"type": "number",
|
|
723
|
+
"description": "Penalizes repeated tokens"
|
|
724
|
+
},
|
|
725
|
+
"n": {
|
|
726
|
+
"type": "number",
|
|
727
|
+
"description": "Number of completions to generate for each prompt"
|
|
728
|
+
},
|
|
729
|
+
"logitBias": {
|
|
730
|
+
"type": "object",
|
|
731
|
+
"additionalProperties": {
|
|
732
|
+
"type": "number"
|
|
733
|
+
},
|
|
734
|
+
"description": "Dictionary used to adjust the probability of specific tokens being generated"
|
|
735
|
+
},
|
|
736
|
+
"user": {
|
|
737
|
+
"type": "string",
|
|
738
|
+
"description": "Unique string identifier representing your end-user, which can help OpenAI to monitor and detect abuse."
|
|
739
|
+
},
|
|
740
|
+
"streaming": {
|
|
741
|
+
"type": "boolean",
|
|
742
|
+
"description": "Whether to stream the results or not. Enabling disables tokenUsage reporting"
|
|
743
|
+
},
|
|
744
|
+
"streamUsage": {
|
|
745
|
+
"type": "boolean",
|
|
746
|
+
"description": "Whether or not to include token usage data in streamed chunks.",
|
|
747
|
+
"default": true
|
|
748
|
+
},
|
|
749
|
+
"modelName": {
|
|
750
|
+
"type": "string",
|
|
751
|
+
"description": "Model name to use Alias for `model`"
|
|
752
|
+
},
|
|
753
|
+
"model": {
|
|
754
|
+
"type": "string",
|
|
755
|
+
"description": "Model name to use"
|
|
756
|
+
},
|
|
757
|
+
"modelKwargs": {
|
|
758
|
+
"type": "object",
|
|
759
|
+
"description": "Holds any additional parameters that are valid to pass to {@link * https://platform.openai.com/docs/api-reference/completions/create | } * `openai.createCompletion`} that are not explicitly specified on this class."
|
|
760
|
+
},
|
|
761
|
+
"stop": {
|
|
762
|
+
"type": "array",
|
|
763
|
+
"items": {
|
|
764
|
+
"type": "string"
|
|
765
|
+
},
|
|
766
|
+
"description": "List of stop words to use when generating Alias for `stopSequences`"
|
|
767
|
+
},
|
|
768
|
+
"stopSequences": {
|
|
769
|
+
"type": "array",
|
|
770
|
+
"items": {
|
|
771
|
+
"type": "string"
|
|
772
|
+
},
|
|
773
|
+
"description": "List of stop words to use when generating"
|
|
774
|
+
},
|
|
775
|
+
"timeout": {
|
|
776
|
+
"type": "number",
|
|
777
|
+
"description": "Timeout to use when making requests to OpenAI."
|
|
778
|
+
},
|
|
779
|
+
"openAIApiKey": {
|
|
780
|
+
"type": "string",
|
|
781
|
+
"description": "API key to use when making requests to OpenAI. Defaults to the value of `OPENAI_API_KEY` environment variable. Alias for `apiKey`"
|
|
782
|
+
},
|
|
783
|
+
"apiKey": {
|
|
784
|
+
"type": "string",
|
|
785
|
+
"description": "API key to use when making requests to OpenAI. Defaults to the value of `OPENAI_API_KEY` environment variable."
|
|
931
786
|
}
|
|
932
|
-
|
|
787
|
+
}
|
|
933
788
|
},
|
|
934
789
|
"tokenLimit": {
|
|
935
790
|
"type": "number",
|
|
936
791
|
"description": "The maximum number of tokens per request.",
|
|
937
|
-
"default":
|
|
792
|
+
"default": 2048
|
|
938
793
|
},
|
|
939
794
|
"temperature": {
|
|
940
795
|
"type": "number",
|
|
@@ -1044,7 +899,8 @@ const schema$1 = {
|
|
|
1044
899
|
"type": "string",
|
|
1045
900
|
"enum": [
|
|
1046
901
|
"openai",
|
|
1047
|
-
"ollama"
|
|
902
|
+
"ollama",
|
|
903
|
+
"anthropic"
|
|
1048
904
|
]
|
|
1049
905
|
},
|
|
1050
906
|
"LLMModel": {
|
|
@@ -1112,51 +968,76 @@ const schema$1 = {
|
|
|
1112
968
|
},
|
|
1113
969
|
{
|
|
1114
970
|
"$ref": "#/definitions/OllamaModel"
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"$ref": "#/definitions/AnthropicModel"
|
|
1115
974
|
}
|
|
1116
975
|
]
|
|
1117
976
|
},
|
|
1118
977
|
"OllamaModel": {
|
|
1119
978
|
"type": "string",
|
|
1120
979
|
"enum": [
|
|
1121
|
-
"
|
|
1122
|
-
"
|
|
1123
|
-
"
|
|
1124
|
-
"mistral",
|
|
1125
|
-
"llama2",
|
|
1126
|
-
"codellama",
|
|
1127
|
-
"codellama:7b",
|
|
980
|
+
"codegemma:2b",
|
|
981
|
+
"codegemma:7b-code",
|
|
982
|
+
"codegemma",
|
|
1128
983
|
"codellama:13b",
|
|
1129
984
|
"codellama:34b",
|
|
1130
985
|
"codellama:70b",
|
|
1131
|
-
"
|
|
986
|
+
"codellama:7b",
|
|
987
|
+
"codellama:instruct",
|
|
988
|
+
"codellama:latest",
|
|
989
|
+
"codellama",
|
|
990
|
+
"gemma:2b",
|
|
991
|
+
"gemma:7b",
|
|
992
|
+
"gemma:latest",
|
|
993
|
+
"gemma",
|
|
1132
994
|
"llama2:13b",
|
|
1133
995
|
"llama2:70b",
|
|
1134
|
-
"
|
|
996
|
+
"llama2:chat",
|
|
997
|
+
"llama2:latest",
|
|
998
|
+
"llama2:text",
|
|
999
|
+
"llama2",
|
|
1000
|
+
"llama3:70b-text",
|
|
1001
|
+
"llama3:70b",
|
|
1135
1002
|
"llama3:latest",
|
|
1136
1003
|
"llama3:text",
|
|
1137
|
-
"llama3:70b",
|
|
1138
|
-
"llama3:
|
|
1139
|
-
"
|
|
1140
|
-
"
|
|
1141
|
-
"
|
|
1142
|
-
"
|
|
1143
|
-
"
|
|
1144
|
-
"
|
|
1145
|
-
"
|
|
1146
|
-
"
|
|
1147
|
-
"
|
|
1004
|
+
"llama3.1:70b",
|
|
1005
|
+
"llama3.1:8b",
|
|
1006
|
+
"llama3.1:latest",
|
|
1007
|
+
"llama3.2",
|
|
1008
|
+
"llama3.2:latest",
|
|
1009
|
+
"llama3.2:1b",
|
|
1010
|
+
"llama3.2:3b",
|
|
1011
|
+
"llama3.2:1b-instruct-fp16",
|
|
1012
|
+
"llama3.2:1b-instruct-q3_K_M",
|
|
1013
|
+
"llama3",
|
|
1014
|
+
"mistral:7b",
|
|
1015
|
+
"mistral:latest",
|
|
1016
|
+
"mistral:text",
|
|
1017
|
+
"mistral",
|
|
1018
|
+
"phi3:14b",
|
|
1019
|
+
"phi3:3.8b",
|
|
1020
|
+
"phi3:instruct",
|
|
1148
1021
|
"phi3:medium-128k",
|
|
1149
|
-
"
|
|
1150
|
-
"
|
|
1151
|
-
"
|
|
1152
|
-
"qwen2:1.5b",
|
|
1022
|
+
"phi3:medium-4k",
|
|
1023
|
+
"phi3:medium",
|
|
1024
|
+
"phi3",
|
|
1153
1025
|
"qwen2:0.5b",
|
|
1154
|
-
"
|
|
1155
|
-
"
|
|
1156
|
-
"
|
|
1157
|
-
"
|
|
1158
|
-
|
|
1159
|
-
|
|
1026
|
+
"qwen2:1.5b",
|
|
1027
|
+
"qwen2:72b-text",
|
|
1028
|
+
"qwen2:72b",
|
|
1029
|
+
"qwen2"
|
|
1030
|
+
]
|
|
1031
|
+
},
|
|
1032
|
+
"AnthropicModel": {
|
|
1033
|
+
"type": "string",
|
|
1034
|
+
"enum": [
|
|
1035
|
+
"claude-3-5-sonnet-20240620",
|
|
1036
|
+
"claude-3-opus-20240229",
|
|
1037
|
+
"claude-3-sonnet-20240229",
|
|
1038
|
+
"claude-3-haiku-20240307",
|
|
1039
|
+
"claude-2.1",
|
|
1040
|
+
"claude-2.0"
|
|
1160
1041
|
]
|
|
1161
1042
|
},
|
|
1162
1043
|
"Callbacks": {
|
|
@@ -1321,20 +1202,6 @@ const schema$1 = {
|
|
|
1321
1202
|
"additionalProperties": false,
|
|
1322
1203
|
"description": "Base class for all caches. All caches should extend this class."
|
|
1323
1204
|
},
|
|
1324
|
-
"StringWithAutocomplete<\"json\">": {
|
|
1325
|
-
"anyOf": [
|
|
1326
|
-
{
|
|
1327
|
-
"type": "string"
|
|
1328
|
-
},
|
|
1329
|
-
{
|
|
1330
|
-
"type": "string",
|
|
1331
|
-
"enum": [
|
|
1332
|
-
"json"
|
|
1333
|
-
]
|
|
1334
|
-
}
|
|
1335
|
-
],
|
|
1336
|
-
"description": "Represents a string value with autocompleted, but not required, suggestions."
|
|
1337
|
-
},
|
|
1338
1205
|
"OllamaLLMService": {
|
|
1339
1206
|
"type": "object",
|
|
1340
1207
|
"additionalProperties": false,
|
|
@@ -1349,321 +1216,321 @@ const schema$1 = {
|
|
|
1349
1216
|
"type": "string"
|
|
1350
1217
|
},
|
|
1351
1218
|
"fields": {
|
|
1219
|
+
"type": "object",
|
|
1220
|
+
"additionalProperties": false,
|
|
1221
|
+
"properties": {
|
|
1222
|
+
"verbose": {
|
|
1223
|
+
"type": "boolean"
|
|
1224
|
+
},
|
|
1225
|
+
"callbacks": {
|
|
1226
|
+
"$ref": "#/definitions/Callbacks"
|
|
1227
|
+
},
|
|
1228
|
+
"tags": {
|
|
1229
|
+
"type": "array",
|
|
1230
|
+
"items": {
|
|
1231
|
+
"type": "string"
|
|
1232
|
+
}
|
|
1233
|
+
},
|
|
1234
|
+
"metadata": {
|
|
1235
|
+
"type": "object",
|
|
1236
|
+
"additionalProperties": {}
|
|
1237
|
+
},
|
|
1238
|
+
"maxConcurrency": {
|
|
1239
|
+
"type": "number",
|
|
1240
|
+
"description": "The maximum number of concurrent calls that can be made. Defaults to `Infinity`, which means no limit."
|
|
1241
|
+
},
|
|
1242
|
+
"maxRetries": {
|
|
1243
|
+
"type": "number",
|
|
1244
|
+
"description": "The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6."
|
|
1245
|
+
},
|
|
1246
|
+
"onFailedAttempt": {
|
|
1247
|
+
"$ref": "#/definitions/FailedAttemptHandler",
|
|
1248
|
+
"description": "Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable."
|
|
1249
|
+
},
|
|
1250
|
+
"callbackManager": {
|
|
1251
|
+
"$ref": "#/definitions/CallbackManager",
|
|
1252
|
+
"deprecated": "Use `callbacks` instead"
|
|
1253
|
+
},
|
|
1254
|
+
"cache": {
|
|
1255
|
+
"anyOf": [
|
|
1256
|
+
{
|
|
1257
|
+
"$ref": "#/definitions/BaseCache"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"type": "boolean"
|
|
1261
|
+
}
|
|
1262
|
+
]
|
|
1263
|
+
},
|
|
1264
|
+
"concurrency": {
|
|
1265
|
+
"type": "number",
|
|
1266
|
+
"deprecated": "Use `maxConcurrency` instead"
|
|
1267
|
+
},
|
|
1268
|
+
"embeddingOnly": {
|
|
1269
|
+
"type": "boolean"
|
|
1270
|
+
},
|
|
1271
|
+
"f16KV": {
|
|
1272
|
+
"type": "boolean"
|
|
1273
|
+
},
|
|
1274
|
+
"frequencyPenalty": {
|
|
1275
|
+
"type": "number"
|
|
1276
|
+
},
|
|
1277
|
+
"headers": {
|
|
1278
|
+
"type": "object",
|
|
1279
|
+
"additionalProperties": {
|
|
1280
|
+
"type": "string"
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
"keepAlive": {
|
|
1284
|
+
"type": "string"
|
|
1285
|
+
},
|
|
1286
|
+
"logitsAll": {
|
|
1287
|
+
"type": "boolean"
|
|
1288
|
+
},
|
|
1289
|
+
"lowVram": {
|
|
1290
|
+
"type": "boolean"
|
|
1291
|
+
},
|
|
1292
|
+
"mainGpu": {
|
|
1293
|
+
"type": "number"
|
|
1294
|
+
},
|
|
1295
|
+
"model": {
|
|
1296
|
+
"type": "string"
|
|
1297
|
+
},
|
|
1298
|
+
"baseUrl": {
|
|
1299
|
+
"type": "string"
|
|
1300
|
+
},
|
|
1301
|
+
"mirostat": {
|
|
1302
|
+
"type": "number"
|
|
1303
|
+
},
|
|
1304
|
+
"mirostatEta": {
|
|
1305
|
+
"type": "number"
|
|
1306
|
+
},
|
|
1307
|
+
"mirostatTau": {
|
|
1308
|
+
"type": "number"
|
|
1309
|
+
},
|
|
1310
|
+
"numBatch": {
|
|
1311
|
+
"type": "number"
|
|
1312
|
+
},
|
|
1313
|
+
"numCtx": {
|
|
1314
|
+
"type": "number"
|
|
1315
|
+
},
|
|
1316
|
+
"numGpu": {
|
|
1317
|
+
"type": "number"
|
|
1318
|
+
},
|
|
1319
|
+
"numGqa": {
|
|
1320
|
+
"type": "number"
|
|
1321
|
+
},
|
|
1322
|
+
"numKeep": {
|
|
1323
|
+
"type": "number"
|
|
1324
|
+
},
|
|
1325
|
+
"numPredict": {
|
|
1326
|
+
"type": "number"
|
|
1327
|
+
},
|
|
1328
|
+
"numThread": {
|
|
1329
|
+
"type": "number"
|
|
1330
|
+
},
|
|
1331
|
+
"penalizeNewline": {
|
|
1332
|
+
"type": "boolean"
|
|
1333
|
+
},
|
|
1334
|
+
"presencePenalty": {
|
|
1335
|
+
"type": "number"
|
|
1336
|
+
},
|
|
1337
|
+
"repeatLastN": {
|
|
1338
|
+
"type": "number"
|
|
1339
|
+
},
|
|
1340
|
+
"repeatPenalty": {
|
|
1341
|
+
"type": "number"
|
|
1342
|
+
},
|
|
1343
|
+
"ropeFrequencyBase": {
|
|
1344
|
+
"type": "number"
|
|
1345
|
+
},
|
|
1346
|
+
"ropeFrequencyScale": {
|
|
1347
|
+
"type": "number"
|
|
1348
|
+
},
|
|
1349
|
+
"temperature": {
|
|
1350
|
+
"type": "number"
|
|
1351
|
+
},
|
|
1352
|
+
"stop": {
|
|
1353
|
+
"type": "array",
|
|
1354
|
+
"items": {
|
|
1355
|
+
"type": "string"
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1358
|
+
"tfsZ": {
|
|
1359
|
+
"type": "number"
|
|
1360
|
+
},
|
|
1361
|
+
"topK": {
|
|
1362
|
+
"type": "number"
|
|
1363
|
+
},
|
|
1364
|
+
"topP": {
|
|
1365
|
+
"type": "number"
|
|
1366
|
+
},
|
|
1367
|
+
"typicalP": {
|
|
1368
|
+
"type": "number"
|
|
1369
|
+
},
|
|
1370
|
+
"useMLock": {
|
|
1371
|
+
"type": "boolean"
|
|
1372
|
+
},
|
|
1373
|
+
"useMMap": {
|
|
1374
|
+
"type": "boolean"
|
|
1375
|
+
},
|
|
1376
|
+
"vocabOnly": {
|
|
1377
|
+
"type": "boolean"
|
|
1378
|
+
},
|
|
1379
|
+
"format": {
|
|
1380
|
+
"$ref": "#/definitions/StringWithAutocomplete%3C%22json%22%3E"
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
"tokenLimit": {
|
|
1385
|
+
"type": "number",
|
|
1386
|
+
"description": "The maximum number of tokens per request.",
|
|
1387
|
+
"default": 2048
|
|
1388
|
+
},
|
|
1389
|
+
"temperature": {
|
|
1390
|
+
"type": "number",
|
|
1391
|
+
"description": "The temperature value controls the randomness of the generated output. Higher values (e.g., 0.8) make the output more random, while lower values (e.g., 0.2) make it more deterministic.",
|
|
1392
|
+
"default": 0.4
|
|
1393
|
+
},
|
|
1394
|
+
"maxConcurrent": {
|
|
1395
|
+
"type": "number",
|
|
1396
|
+
"description": "The maximum number of requests to make concurrently.",
|
|
1397
|
+
"default": 6
|
|
1398
|
+
},
|
|
1399
|
+
"authentication": {
|
|
1352
1400
|
"anyOf": [
|
|
1353
1401
|
{
|
|
1354
1402
|
"type": "object",
|
|
1355
|
-
"additionalProperties": false,
|
|
1356
1403
|
"properties": {
|
|
1357
|
-
"
|
|
1358
|
-
"type": "boolean"
|
|
1359
|
-
},
|
|
1360
|
-
"callbacks": {
|
|
1361
|
-
"$ref": "#/definitions/Callbacks"
|
|
1362
|
-
},
|
|
1363
|
-
"tags": {
|
|
1364
|
-
"type": "array",
|
|
1365
|
-
"items": {
|
|
1366
|
-
"type": "string"
|
|
1367
|
-
}
|
|
1368
|
-
},
|
|
1369
|
-
"metadata": {
|
|
1370
|
-
"type": "object",
|
|
1371
|
-
"additionalProperties": {}
|
|
1372
|
-
},
|
|
1373
|
-
"maxConcurrency": {
|
|
1374
|
-
"type": "number",
|
|
1375
|
-
"description": "The maximum number of concurrent calls that can be made. Defaults to `Infinity`, which means no limit."
|
|
1376
|
-
},
|
|
1377
|
-
"maxRetries": {
|
|
1378
|
-
"type": "number",
|
|
1379
|
-
"description": "The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6."
|
|
1380
|
-
},
|
|
1381
|
-
"onFailedAttempt": {
|
|
1382
|
-
"$ref": "#/definitions/FailedAttemptHandler",
|
|
1383
|
-
"description": "Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable."
|
|
1384
|
-
},
|
|
1385
|
-
"callbackManager": {
|
|
1386
|
-
"$ref": "#/definitions/CallbackManager",
|
|
1387
|
-
"deprecated": "Use `callbacks` instead"
|
|
1388
|
-
},
|
|
1389
|
-
"cache": {
|
|
1390
|
-
"anyOf": [
|
|
1391
|
-
{
|
|
1392
|
-
"$ref": "#/definitions/BaseCache"
|
|
1393
|
-
},
|
|
1394
|
-
{
|
|
1395
|
-
"type": "boolean"
|
|
1396
|
-
}
|
|
1397
|
-
]
|
|
1398
|
-
},
|
|
1399
|
-
"concurrency": {
|
|
1400
|
-
"type": "number",
|
|
1401
|
-
"deprecated": "Use `maxConcurrency` instead"
|
|
1402
|
-
},
|
|
1403
|
-
"bestOf": {
|
|
1404
|
-
"type": "number",
|
|
1405
|
-
"description": "Generates `bestOf` completions server side and returns the \"best\""
|
|
1406
|
-
},
|
|
1407
|
-
"batchSize": {
|
|
1408
|
-
"type": "number",
|
|
1409
|
-
"description": "Batch size to use when passing multiple documents to generate"
|
|
1410
|
-
},
|
|
1411
|
-
"temperature": {
|
|
1412
|
-
"type": "number",
|
|
1413
|
-
"description": "Sampling temperature to use"
|
|
1414
|
-
},
|
|
1415
|
-
"maxTokens": {
|
|
1416
|
-
"type": "number",
|
|
1417
|
-
"description": "Maximum number of tokens to generate in the completion. -1 returns as many tokens as possible given the prompt and the model's maximum context size."
|
|
1418
|
-
},
|
|
1419
|
-
"topP": {
|
|
1420
|
-
"type": "number",
|
|
1421
|
-
"description": "Total probability mass of tokens to consider at each step"
|
|
1422
|
-
},
|
|
1423
|
-
"frequencyPenalty": {
|
|
1424
|
-
"type": "number",
|
|
1425
|
-
"description": "Penalizes repeated tokens according to frequency"
|
|
1426
|
-
},
|
|
1427
|
-
"presencePenalty": {
|
|
1428
|
-
"type": "number",
|
|
1429
|
-
"description": "Penalizes repeated tokens"
|
|
1430
|
-
},
|
|
1431
|
-
"n": {
|
|
1432
|
-
"type": "number",
|
|
1433
|
-
"description": "Number of completions to generate for each prompt"
|
|
1434
|
-
},
|
|
1435
|
-
"logitBias": {
|
|
1436
|
-
"type": "object",
|
|
1437
|
-
"additionalProperties": {
|
|
1438
|
-
"type": "number"
|
|
1439
|
-
},
|
|
1440
|
-
"description": "Dictionary used to adjust the probability of specific tokens being generated"
|
|
1441
|
-
},
|
|
1442
|
-
"user": {
|
|
1443
|
-
"type": "string",
|
|
1444
|
-
"description": "Unique string identifier representing your end-user, which can help OpenAI to monitor and detect abuse."
|
|
1445
|
-
},
|
|
1446
|
-
"streaming": {
|
|
1447
|
-
"type": "boolean",
|
|
1448
|
-
"description": "Whether to stream the results or not. Enabling disables tokenUsage reporting"
|
|
1449
|
-
},
|
|
1450
|
-
"streamUsage": {
|
|
1451
|
-
"type": "boolean",
|
|
1452
|
-
"description": "Whether or not to include token usage data in streamed chunks.",
|
|
1453
|
-
"default": true
|
|
1454
|
-
},
|
|
1455
|
-
"modelName": {
|
|
1404
|
+
"type": {
|
|
1456
1405
|
"type": "string",
|
|
1457
|
-
"
|
|
1406
|
+
"const": "None"
|
|
1458
1407
|
},
|
|
1459
|
-
"
|
|
1408
|
+
"credentials": {
|
|
1409
|
+
"not": {}
|
|
1410
|
+
}
|
|
1411
|
+
},
|
|
1412
|
+
"required": [
|
|
1413
|
+
"type"
|
|
1414
|
+
],
|
|
1415
|
+
"additionalProperties": false
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"type": "object",
|
|
1419
|
+
"properties": {
|
|
1420
|
+
"type": {
|
|
1460
1421
|
"type": "string",
|
|
1461
|
-
"
|
|
1422
|
+
"const": "OAuth"
|
|
1462
1423
|
},
|
|
1463
|
-
"
|
|
1424
|
+
"credentials": {
|
|
1464
1425
|
"type": "object",
|
|
1465
|
-
"
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
"type": "array",
|
|
1476
|
-
"items": {
|
|
1477
|
-
"type": "string"
|
|
1426
|
+
"properties": {
|
|
1427
|
+
"clientId": {
|
|
1428
|
+
"type": "string"
|
|
1429
|
+
},
|
|
1430
|
+
"clientSecret": {
|
|
1431
|
+
"type": "string"
|
|
1432
|
+
},
|
|
1433
|
+
"token": {
|
|
1434
|
+
"type": "string"
|
|
1435
|
+
}
|
|
1478
1436
|
},
|
|
1479
|
-
"
|
|
1480
|
-
},
|
|
1481
|
-
"timeout": {
|
|
1482
|
-
"type": "number",
|
|
1483
|
-
"description": "Timeout to use when making requests to OpenAI."
|
|
1484
|
-
},
|
|
1485
|
-
"openAIApiKey": {
|
|
1486
|
-
"type": "string",
|
|
1487
|
-
"description": "API key to use when making requests to OpenAI. Defaults to the value of `OPENAI_API_KEY` environment variable. Alias for `apiKey`"
|
|
1488
|
-
},
|
|
1489
|
-
"apiKey": {
|
|
1490
|
-
"type": "string",
|
|
1491
|
-
"description": "API key to use when making requests to OpenAI. Defaults to the value of `OPENAI_API_KEY` environment variable."
|
|
1437
|
+
"additionalProperties": false
|
|
1492
1438
|
}
|
|
1493
|
-
}
|
|
1439
|
+
},
|
|
1440
|
+
"required": [
|
|
1441
|
+
"type",
|
|
1442
|
+
"credentials"
|
|
1443
|
+
],
|
|
1444
|
+
"additionalProperties": false
|
|
1494
1445
|
},
|
|
1495
1446
|
{
|
|
1496
1447
|
"type": "object",
|
|
1497
|
-
"additionalProperties": false,
|
|
1498
1448
|
"properties": {
|
|
1499
|
-
"
|
|
1500
|
-
"type": "
|
|
1501
|
-
|
|
1502
|
-
"callbacks": {
|
|
1503
|
-
"$ref": "#/definitions/Callbacks"
|
|
1504
|
-
},
|
|
1505
|
-
"tags": {
|
|
1506
|
-
"type": "array",
|
|
1507
|
-
"items": {
|
|
1508
|
-
"type": "string"
|
|
1509
|
-
}
|
|
1449
|
+
"type": {
|
|
1450
|
+
"type": "string",
|
|
1451
|
+
"const": "APIKey"
|
|
1510
1452
|
},
|
|
1511
|
-
"
|
|
1453
|
+
"credentials": {
|
|
1512
1454
|
"type": "object",
|
|
1513
|
-
"
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
"type": "number",
|
|
1517
|
-
"description": "The maximum number of concurrent calls that can be made. Defaults to `Infinity`, which means no limit."
|
|
1518
|
-
},
|
|
1519
|
-
"maxRetries": {
|
|
1520
|
-
"type": "number",
|
|
1521
|
-
"description": "The maximum number of retries that can be made for a single call, with an exponential backoff between each attempt. Defaults to 6."
|
|
1522
|
-
},
|
|
1523
|
-
"onFailedAttempt": {
|
|
1524
|
-
"$ref": "#/definitions/FailedAttemptHandler",
|
|
1525
|
-
"description": "Custom handler to handle failed attempts. Takes the originally thrown error object as input, and should itself throw an error if the input error is not retryable."
|
|
1526
|
-
},
|
|
1527
|
-
"callbackManager": {
|
|
1528
|
-
"$ref": "#/definitions/CallbackManager",
|
|
1529
|
-
"deprecated": "Use `callbacks` instead"
|
|
1530
|
-
},
|
|
1531
|
-
"cache": {
|
|
1532
|
-
"anyOf": [
|
|
1533
|
-
{
|
|
1534
|
-
"$ref": "#/definitions/BaseCache"
|
|
1535
|
-
},
|
|
1536
|
-
{
|
|
1537
|
-
"type": "boolean"
|
|
1455
|
+
"properties": {
|
|
1456
|
+
"apiKey": {
|
|
1457
|
+
"type": "string"
|
|
1538
1458
|
}
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
"
|
|
1544
|
-
},
|
|
1545
|
-
"embeddingOnly": {
|
|
1546
|
-
"type": "boolean"
|
|
1547
|
-
},
|
|
1548
|
-
"f16KV": {
|
|
1549
|
-
"type": "boolean"
|
|
1550
|
-
},
|
|
1551
|
-
"frequencyPenalty": {
|
|
1552
|
-
"type": "number"
|
|
1553
|
-
},
|
|
1554
|
-
"headers": {
|
|
1555
|
-
"type": "object",
|
|
1556
|
-
"additionalProperties": {
|
|
1557
|
-
"type": "string"
|
|
1558
|
-
}
|
|
1559
|
-
},
|
|
1560
|
-
"keepAlive": {
|
|
1561
|
-
"type": "string"
|
|
1562
|
-
},
|
|
1563
|
-
"logitsAll": {
|
|
1564
|
-
"type": "boolean"
|
|
1565
|
-
},
|
|
1566
|
-
"lowVram": {
|
|
1567
|
-
"type": "boolean"
|
|
1568
|
-
},
|
|
1569
|
-
"mainGpu": {
|
|
1570
|
-
"type": "number"
|
|
1571
|
-
},
|
|
1572
|
-
"model": {
|
|
1573
|
-
"type": "string"
|
|
1574
|
-
},
|
|
1575
|
-
"baseUrl": {
|
|
1576
|
-
"type": "string"
|
|
1577
|
-
},
|
|
1578
|
-
"mirostat": {
|
|
1579
|
-
"type": "number"
|
|
1580
|
-
},
|
|
1581
|
-
"mirostatEta": {
|
|
1582
|
-
"type": "number"
|
|
1583
|
-
},
|
|
1584
|
-
"mirostatTau": {
|
|
1585
|
-
"type": "number"
|
|
1586
|
-
},
|
|
1587
|
-
"numBatch": {
|
|
1588
|
-
"type": "number"
|
|
1589
|
-
},
|
|
1590
|
-
"numCtx": {
|
|
1591
|
-
"type": "number"
|
|
1592
|
-
},
|
|
1593
|
-
"numGpu": {
|
|
1594
|
-
"type": "number"
|
|
1595
|
-
},
|
|
1596
|
-
"numGqa": {
|
|
1597
|
-
"type": "number"
|
|
1598
|
-
},
|
|
1599
|
-
"numKeep": {
|
|
1600
|
-
"type": "number"
|
|
1601
|
-
},
|
|
1602
|
-
"numPredict": {
|
|
1603
|
-
"type": "number"
|
|
1604
|
-
},
|
|
1605
|
-
"numThread": {
|
|
1606
|
-
"type": "number"
|
|
1607
|
-
},
|
|
1608
|
-
"penalizeNewline": {
|
|
1609
|
-
"type": "boolean"
|
|
1610
|
-
},
|
|
1611
|
-
"presencePenalty": {
|
|
1612
|
-
"type": "number"
|
|
1613
|
-
},
|
|
1614
|
-
"repeatLastN": {
|
|
1615
|
-
"type": "number"
|
|
1616
|
-
},
|
|
1617
|
-
"repeatPenalty": {
|
|
1618
|
-
"type": "number"
|
|
1619
|
-
},
|
|
1620
|
-
"ropeFrequencyBase": {
|
|
1621
|
-
"type": "number"
|
|
1622
|
-
},
|
|
1623
|
-
"ropeFrequencyScale": {
|
|
1624
|
-
"type": "number"
|
|
1625
|
-
},
|
|
1626
|
-
"temperature": {
|
|
1627
|
-
"type": "number"
|
|
1628
|
-
},
|
|
1629
|
-
"stop": {
|
|
1630
|
-
"type": "array",
|
|
1631
|
-
"items": {
|
|
1632
|
-
"type": "string"
|
|
1633
|
-
}
|
|
1634
|
-
},
|
|
1635
|
-
"tfsZ": {
|
|
1636
|
-
"type": "number"
|
|
1637
|
-
},
|
|
1638
|
-
"topK": {
|
|
1639
|
-
"type": "number"
|
|
1640
|
-
},
|
|
1641
|
-
"topP": {
|
|
1642
|
-
"type": "number"
|
|
1643
|
-
},
|
|
1644
|
-
"typicalP": {
|
|
1645
|
-
"type": "number"
|
|
1646
|
-
},
|
|
1647
|
-
"useMLock": {
|
|
1648
|
-
"type": "boolean"
|
|
1649
|
-
},
|
|
1650
|
-
"useMMap": {
|
|
1651
|
-
"type": "boolean"
|
|
1652
|
-
},
|
|
1653
|
-
"vocabOnly": {
|
|
1654
|
-
"type": "boolean"
|
|
1655
|
-
},
|
|
1656
|
-
"format": {
|
|
1657
|
-
"$ref": "#/definitions/StringWithAutocomplete%3C%22json%22%3E"
|
|
1459
|
+
},
|
|
1460
|
+
"required": [
|
|
1461
|
+
"apiKey"
|
|
1462
|
+
],
|
|
1463
|
+
"additionalProperties": false
|
|
1658
1464
|
}
|
|
1659
|
-
}
|
|
1465
|
+
},
|
|
1466
|
+
"required": [
|
|
1467
|
+
"type",
|
|
1468
|
+
"credentials"
|
|
1469
|
+
],
|
|
1470
|
+
"additionalProperties": false
|
|
1660
1471
|
}
|
|
1661
1472
|
]
|
|
1662
1473
|
},
|
|
1474
|
+
"requestOptions": {
|
|
1475
|
+
"type": "object",
|
|
1476
|
+
"properties": {
|
|
1477
|
+
"timeout": {
|
|
1478
|
+
"type": "number"
|
|
1479
|
+
},
|
|
1480
|
+
"maxRetries": {
|
|
1481
|
+
"type": "number"
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
"additionalProperties": false
|
|
1485
|
+
}
|
|
1486
|
+
},
|
|
1487
|
+
"required": [
|
|
1488
|
+
"authentication",
|
|
1489
|
+
"endpoint",
|
|
1490
|
+
"model",
|
|
1491
|
+
"provider"
|
|
1492
|
+
]
|
|
1493
|
+
},
|
|
1494
|
+
"StringWithAutocomplete<\"json\">": {
|
|
1495
|
+
"anyOf": [
|
|
1496
|
+
{
|
|
1497
|
+
"type": "string"
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
"type": "string",
|
|
1501
|
+
"enum": [
|
|
1502
|
+
"json"
|
|
1503
|
+
]
|
|
1504
|
+
}
|
|
1505
|
+
],
|
|
1506
|
+
"description": "Represents a string value with autocompleted, but not required, suggestions."
|
|
1507
|
+
},
|
|
1508
|
+
"AnthropicLLMService": {
|
|
1509
|
+
"type": "object",
|
|
1510
|
+
"additionalProperties": false,
|
|
1511
|
+
"properties": {
|
|
1512
|
+
"provider": {
|
|
1513
|
+
"$ref": "#/definitions/LLMProvider"
|
|
1514
|
+
},
|
|
1515
|
+
"model": {
|
|
1516
|
+
"$ref": "#/definitions/LLMModel"
|
|
1517
|
+
},
|
|
1518
|
+
"fields": {
|
|
1519
|
+
"type": "object",
|
|
1520
|
+
"properties": {
|
|
1521
|
+
"temperature": {
|
|
1522
|
+
"type": "number"
|
|
1523
|
+
},
|
|
1524
|
+
"maxTokens": {
|
|
1525
|
+
"type": "number"
|
|
1526
|
+
}
|
|
1527
|
+
},
|
|
1528
|
+
"additionalProperties": false
|
|
1529
|
+
},
|
|
1663
1530
|
"tokenLimit": {
|
|
1664
1531
|
"type": "number",
|
|
1665
1532
|
"description": "The maximum number of tokens per request.",
|
|
1666
|
-
"default":
|
|
1533
|
+
"default": 2048
|
|
1667
1534
|
},
|
|
1668
1535
|
"temperature": {
|
|
1669
1536
|
"type": "number",
|
|
@@ -1765,7 +1632,6 @@ const schema$1 = {
|
|
|
1765
1632
|
},
|
|
1766
1633
|
"required": [
|
|
1767
1634
|
"authentication",
|
|
1768
|
-
"endpoint",
|
|
1769
1635
|
"model",
|
|
1770
1636
|
"provider"
|
|
1771
1637
|
]
|
|
@@ -1845,6 +1711,18 @@ function parseServiceConfig(service) {
|
|
|
1845
1711
|
}
|
|
1846
1712
|
}
|
|
1847
1713
|
};
|
|
1714
|
+
case 'anthropic':
|
|
1715
|
+
return {
|
|
1716
|
+
provider: 'anthropic',
|
|
1717
|
+
model: service.model,
|
|
1718
|
+
authentication: {
|
|
1719
|
+
type: 'APIKey',
|
|
1720
|
+
credentials: {
|
|
1721
|
+
apiKey: service.apiKey
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
fields: service.fields
|
|
1725
|
+
};
|
|
1848
1726
|
case 'ollama':
|
|
1849
1727
|
return {
|
|
1850
1728
|
provider: 'ollama',
|
|
@@ -1953,6 +1831,31 @@ function commandExecutor(handler) {
|
|
|
1953
1831
|
};
|
|
1954
1832
|
}
|
|
1955
1833
|
|
|
1834
|
+
const command$4 = 'changelog';
|
|
1835
|
+
/**
|
|
1836
|
+
* Command line options via yargs
|
|
1837
|
+
*/
|
|
1838
|
+
const options$4 = {
|
|
1839
|
+
range: {
|
|
1840
|
+
type: 'string',
|
|
1841
|
+
alias: 'r',
|
|
1842
|
+
description: 'Commit range e.g `HEAD~2:HEAD`',
|
|
1843
|
+
},
|
|
1844
|
+
branch: {
|
|
1845
|
+
type: 'string',
|
|
1846
|
+
alias: 'b',
|
|
1847
|
+
description: 'Target branch to compare against',
|
|
1848
|
+
},
|
|
1849
|
+
i: {
|
|
1850
|
+
type: 'boolean',
|
|
1851
|
+
alias: 'interactive',
|
|
1852
|
+
description: 'Toggle interactive mode',
|
|
1853
|
+
},
|
|
1854
|
+
};
|
|
1855
|
+
const builder$4 = (yargs) => {
|
|
1856
|
+
return yargs.options(options$4).usage(getCommandUsageHeader(command$4));
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1956
1859
|
/**
|
|
1957
1860
|
* Get LLM Model Based on Configuration
|
|
1958
1861
|
*
|
|
@@ -2375,8 +2278,11 @@ async function handleResult({ result, mode, interactiveModeCallback }) {
|
|
|
2375
2278
|
|
|
2376
2279
|
const template$3 = `Write informative git changelog, in the imperative, based on a series of individual messages.
|
|
2377
2280
|
|
|
2378
|
-
-
|
|
2281
|
+
- Annotate each change with the git commit hash as reference, including just the first 7 characters
|
|
2379
2282
|
- Logically group changes, and if necessary, summarize dependency updates
|
|
2283
|
+
- Include a descriptive title for the changelog, to give a high-level overview of the changes
|
|
2284
|
+
- Depending on the size of the changes, consider breaking the changelog into sections
|
|
2285
|
+
- Avoid generlizations like "various bug fixes" or "improvements" or "enhancements"
|
|
2380
2286
|
|
|
2381
2287
|
{format_instructions}
|
|
2382
2288
|
|
|
@@ -2457,7 +2363,7 @@ const handler$4 = async (argv, logger) => {
|
|
|
2457
2363
|
variables: CHANGELOG_PROMPT.inputVariables,
|
|
2458
2364
|
fallback: CHANGELOG_PROMPT,
|
|
2459
2365
|
});
|
|
2460
|
-
const formatInstructions = "Respond with a valid JSON object, containing two fields: '
|
|
2366
|
+
const formatInstructions = "Respond with a valid JSON object, containing two fields: 'title' a string, no more than 65 characters, and 'content' a string.";
|
|
2461
2367
|
const changelog = await executeChain({
|
|
2462
2368
|
llm,
|
|
2463
2369
|
prompt,
|
|
@@ -2470,7 +2376,7 @@ const handler$4 = async (argv, logger) => {
|
|
|
2470
2376
|
const branchName = await getCurrentBranchName({ git });
|
|
2471
2377
|
const ticketId = extractTicketIdFromBranchName(branchName);
|
|
2472
2378
|
const footer = ticketId ? `\n\nPart of **${ticketId}**` : '';
|
|
2473
|
-
return `${changelog.
|
|
2379
|
+
return `${changelog.title}\n\n${changelog.content}${footer}`;
|
|
2474
2380
|
},
|
|
2475
2381
|
noResult: async () => {
|
|
2476
2382
|
if (config.range) {
|
|
@@ -2491,36 +2397,47 @@ const handler$4 = async (argv, logger) => {
|
|
|
2491
2397
|
});
|
|
2492
2398
|
};
|
|
2493
2399
|
|
|
2400
|
+
var changelog = {
|
|
2401
|
+
command: command$4,
|
|
2402
|
+
desc: 'Generate a changelog from current or target branch or provided commit range.',
|
|
2403
|
+
builder: builder$4,
|
|
2404
|
+
handler: commandExecutor(handler$4),
|
|
2405
|
+
options: options$4,
|
|
2406
|
+
};
|
|
2407
|
+
|
|
2408
|
+
const command$3 = 'commit';
|
|
2494
2409
|
/**
|
|
2495
2410
|
* Command line options via yargs
|
|
2496
2411
|
*/
|
|
2497
|
-
const options$
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2412
|
+
const options$3 = {
|
|
2413
|
+
i: {
|
|
2414
|
+
alias: 'interactive',
|
|
2415
|
+
description: 'Toggle interactive mode',
|
|
2416
|
+
type: 'boolean',
|
|
2502
2417
|
},
|
|
2503
|
-
|
|
2418
|
+
ignoredFiles: {
|
|
2419
|
+
description: 'Ignored files',
|
|
2420
|
+
type: 'array',
|
|
2421
|
+
},
|
|
2422
|
+
ignoredExtensions: {
|
|
2423
|
+
description: 'Ignored extensions',
|
|
2424
|
+
type: 'array',
|
|
2425
|
+
},
|
|
2426
|
+
append: {
|
|
2427
|
+
description: 'Add content to the end of the generated commit message',
|
|
2504
2428
|
type: 'string',
|
|
2505
|
-
alias: 'b',
|
|
2506
|
-
description: 'Target branch to compare against',
|
|
2507
2429
|
},
|
|
2508
|
-
|
|
2430
|
+
appendTicket: {
|
|
2431
|
+
description: 'Append ticket ID from branch name to the commit message',
|
|
2509
2432
|
type: 'boolean',
|
|
2510
|
-
|
|
2511
|
-
|
|
2433
|
+
},
|
|
2434
|
+
additional: {
|
|
2435
|
+
description: 'Add extra contextual information to the prompt',
|
|
2436
|
+
type: 'string',
|
|
2512
2437
|
},
|
|
2513
2438
|
};
|
|
2514
|
-
const builder$
|
|
2515
|
-
return yargs.options(options$
|
|
2516
|
-
};
|
|
2517
|
-
|
|
2518
|
-
var changelog = {
|
|
2519
|
-
command: 'changelog',
|
|
2520
|
-
desc: 'Generate a changelog from current or target branch or provided commit range.',
|
|
2521
|
-
builder: builder$4,
|
|
2522
|
-
handler: commandExecutor(handler$4),
|
|
2523
|
-
options: options$4,
|
|
2439
|
+
const builder$3 = (yargs) => {
|
|
2440
|
+
return yargs.options(options$3).usage(getCommandUsageHeader(command$3));
|
|
2524
2441
|
};
|
|
2525
2442
|
|
|
2526
2443
|
/**
|
|
@@ -6322,7 +6239,13 @@ const handler$3 = async (argv, logger) => {
|
|
|
6322
6239
|
logger.log(LOGO);
|
|
6323
6240
|
}
|
|
6324
6241
|
async function factory() {
|
|
6325
|
-
const changes = await getChanges({
|
|
6242
|
+
const changes = await getChanges({
|
|
6243
|
+
git,
|
|
6244
|
+
options: {
|
|
6245
|
+
ignoredFiles: config.ignoredFiles || undefined,
|
|
6246
|
+
ignoredExtensions: config.ignoredExtensions || undefined,
|
|
6247
|
+
},
|
|
6248
|
+
});
|
|
6326
6249
|
return changes.staged;
|
|
6327
6250
|
}
|
|
6328
6251
|
async function parser(changes) {
|
|
@@ -6392,46 +6315,27 @@ const handler$3 = async (argv, logger) => {
|
|
|
6392
6315
|
});
|
|
6393
6316
|
};
|
|
6394
6317
|
|
|
6318
|
+
var commit = {
|
|
6319
|
+
command: command$3,
|
|
6320
|
+
desc: 'Summarize the staged changes in a commit message.',
|
|
6321
|
+
builder: builder$3,
|
|
6322
|
+
handler: commandExecutor(handler$3),
|
|
6323
|
+
options: options$3,
|
|
6324
|
+
};
|
|
6325
|
+
|
|
6326
|
+
const command$2 = 'init';
|
|
6395
6327
|
/**
|
|
6396
6328
|
* Command line options via yargs
|
|
6397
6329
|
*/
|
|
6398
|
-
const options$
|
|
6399
|
-
|
|
6400
|
-
alias: 'interactive',
|
|
6401
|
-
description: 'Toggle interactive mode',
|
|
6402
|
-
type: 'boolean',
|
|
6403
|
-
},
|
|
6404
|
-
ignoredFiles: {
|
|
6405
|
-
description: 'Ignored files',
|
|
6406
|
-
type: 'array',
|
|
6407
|
-
},
|
|
6408
|
-
ignoredExtensions: {
|
|
6409
|
-
description: 'Ignored extensions',
|
|
6410
|
-
type: 'array',
|
|
6411
|
-
},
|
|
6412
|
-
append: {
|
|
6413
|
-
description: 'Add content to the end of the generated commit message',
|
|
6414
|
-
type: 'string',
|
|
6415
|
-
},
|
|
6416
|
-
appendTicket: {
|
|
6417
|
-
description: 'Append ticket ID from branch name to the commit message',
|
|
6418
|
-
type: 'boolean',
|
|
6419
|
-
},
|
|
6420
|
-
additional: {
|
|
6421
|
-
description: 'Add extra contextual information to the prompt',
|
|
6330
|
+
const options$2 = {
|
|
6331
|
+
scope: {
|
|
6422
6332
|
type: 'string',
|
|
6333
|
+
description: 'configure coco for the current user or project?',
|
|
6334
|
+
choices: ['global', 'project'],
|
|
6423
6335
|
},
|
|
6424
6336
|
};
|
|
6425
|
-
const builder$
|
|
6426
|
-
return yargs.options(options$
|
|
6427
|
-
};
|
|
6428
|
-
|
|
6429
|
-
var commit = {
|
|
6430
|
-
command: 'commit',
|
|
6431
|
-
desc: 'Summarize the staged changes in a commit message.',
|
|
6432
|
-
builder: builder$3,
|
|
6433
|
-
handler: commandExecutor(handler$3),
|
|
6434
|
-
options: options$3,
|
|
6337
|
+
const builder$2 = (yargs) => {
|
|
6338
|
+
return yargs.options(options$2).usage(getCommandUsageHeader(command$2));
|
|
6435
6339
|
};
|
|
6436
6340
|
|
|
6437
6341
|
/**
|
|
@@ -6867,28 +6771,48 @@ const handler$2 = async (argv, logger) => {
|
|
|
6867
6771
|
}
|
|
6868
6772
|
};
|
|
6869
6773
|
|
|
6870
|
-
/**
|
|
6871
|
-
* Command line options via yargs
|
|
6872
|
-
*/
|
|
6873
|
-
const options$2 = {
|
|
6874
|
-
scope: {
|
|
6875
|
-
type: 'string',
|
|
6876
|
-
description: 'configure coco for the current user or project?',
|
|
6877
|
-
choices: ['global', 'project'],
|
|
6878
|
-
},
|
|
6879
|
-
};
|
|
6880
|
-
const builder$2 = (yargs) => {
|
|
6881
|
-
return yargs.options(options$2).usage(getCommandUsageHeader(init.command));
|
|
6882
|
-
};
|
|
6883
|
-
|
|
6884
6774
|
var init = {
|
|
6885
|
-
command:
|
|
6775
|
+
command: command$2,
|
|
6886
6776
|
desc: 'install & configure coco globally or for the current project',
|
|
6887
6777
|
builder: builder$2,
|
|
6888
6778
|
handler: commandExecutor(handler$2),
|
|
6889
6779
|
options: options$2,
|
|
6890
6780
|
};
|
|
6891
6781
|
|
|
6782
|
+
const command$1 = 'recap';
|
|
6783
|
+
/**
|
|
6784
|
+
* Command line options via yargs
|
|
6785
|
+
*/
|
|
6786
|
+
const options$1 = {
|
|
6787
|
+
yesterday: {
|
|
6788
|
+
type: 'boolean',
|
|
6789
|
+
description: 'Recap for yesterday',
|
|
6790
|
+
},
|
|
6791
|
+
'last-week': {
|
|
6792
|
+
alias: 'week',
|
|
6793
|
+
type: 'boolean',
|
|
6794
|
+
description: 'Recap for last week',
|
|
6795
|
+
},
|
|
6796
|
+
'last-month': {
|
|
6797
|
+
alias: 'month',
|
|
6798
|
+
type: 'boolean',
|
|
6799
|
+
description: 'Recap for last month',
|
|
6800
|
+
},
|
|
6801
|
+
'last-tag': {
|
|
6802
|
+
alias: 'tag',
|
|
6803
|
+
type: 'boolean',
|
|
6804
|
+
description: 'Recap for last tag',
|
|
6805
|
+
},
|
|
6806
|
+
i: {
|
|
6807
|
+
type: 'boolean',
|
|
6808
|
+
alias: 'interactive',
|
|
6809
|
+
description: 'Toggle interactive mode',
|
|
6810
|
+
},
|
|
6811
|
+
};
|
|
6812
|
+
const builder$1 = (yargs) => {
|
|
6813
|
+
return yargs.options(options$1).usage(getCommandUsageHeader(command$1));
|
|
6814
|
+
};
|
|
6815
|
+
|
|
6892
6816
|
/**
|
|
6893
6817
|
* Formats a commit log into a readable string format.
|
|
6894
6818
|
*
|
|
@@ -7067,45 +6991,32 @@ const handler$1 = async (argv, logger) => {
|
|
|
7067
6991
|
});
|
|
7068
6992
|
};
|
|
7069
6993
|
|
|
6994
|
+
var recap = {
|
|
6995
|
+
command: command$1,
|
|
6996
|
+
desc: 'Summarize the changes in the repository over a specified timeframe.',
|
|
6997
|
+
builder: builder$1,
|
|
6998
|
+
handler: commandExecutor(handler$1),
|
|
6999
|
+
options: options$1,
|
|
7000
|
+
};
|
|
7001
|
+
|
|
7002
|
+
const command = 'review';
|
|
7070
7003
|
/**
|
|
7071
7004
|
* Command line options via yargs
|
|
7072
7005
|
*/
|
|
7073
|
-
const options
|
|
7074
|
-
yesterday: {
|
|
7075
|
-
type: 'boolean',
|
|
7076
|
-
description: 'Recap for yesterday',
|
|
7077
|
-
},
|
|
7078
|
-
'last-week': {
|
|
7079
|
-
alias: 'week',
|
|
7080
|
-
type: 'boolean',
|
|
7081
|
-
description: 'Recap for last week',
|
|
7082
|
-
},
|
|
7083
|
-
'last-month': {
|
|
7084
|
-
alias: 'month',
|
|
7085
|
-
type: 'boolean',
|
|
7086
|
-
description: 'Recap for last month',
|
|
7087
|
-
},
|
|
7088
|
-
'last-tag': {
|
|
7089
|
-
alias: 'tag',
|
|
7090
|
-
type: 'boolean',
|
|
7091
|
-
description: 'Recap for last tag',
|
|
7092
|
-
},
|
|
7006
|
+
const options = {
|
|
7093
7007
|
i: {
|
|
7094
7008
|
type: 'boolean',
|
|
7095
7009
|
alias: 'interactive',
|
|
7096
7010
|
description: 'Toggle interactive mode',
|
|
7097
7011
|
},
|
|
7012
|
+
b: {
|
|
7013
|
+
type: 'string',
|
|
7014
|
+
alias: 'branch',
|
|
7015
|
+
description: 'Branch to review',
|
|
7016
|
+
},
|
|
7098
7017
|
};
|
|
7099
|
-
const builder
|
|
7100
|
-
return yargs.options(options
|
|
7101
|
-
};
|
|
7102
|
-
|
|
7103
|
-
var recap = {
|
|
7104
|
-
command: 'recap',
|
|
7105
|
-
desc: 'Summarize the changes in the repository over a specified timeframe.',
|
|
7106
|
-
builder: builder$1,
|
|
7107
|
-
handler: commandExecutor(handler$1),
|
|
7108
|
-
options: options$1,
|
|
7018
|
+
const builder = (yargs) => {
|
|
7019
|
+
return yargs.options(options).usage(getCommandUsageHeader(command));
|
|
7109
7020
|
};
|
|
7110
7021
|
|
|
7111
7022
|
/**
|
|
@@ -28422,28 +28333,9 @@ const handler = async (argv, logger) => {
|
|
|
28422
28333
|
await reviewer.start();
|
|
28423
28334
|
};
|
|
28424
28335
|
|
|
28425
|
-
/**
|
|
28426
|
-
* Command line options via yargs
|
|
28427
|
-
*/
|
|
28428
|
-
const options = {
|
|
28429
|
-
i: {
|
|
28430
|
-
type: 'boolean',
|
|
28431
|
-
alias: 'interactive',
|
|
28432
|
-
description: 'Toggle interactive mode',
|
|
28433
|
-
},
|
|
28434
|
-
'b': {
|
|
28435
|
-
type: 'string',
|
|
28436
|
-
alias: 'branch',
|
|
28437
|
-
description: 'Branch to review',
|
|
28438
|
-
},
|
|
28439
|
-
};
|
|
28440
|
-
const builder = (yargs) => {
|
|
28441
|
-
return yargs.options(options).usage(getCommandUsageHeader(review.command));
|
|
28442
|
-
};
|
|
28443
|
-
|
|
28444
28336
|
var review = {
|
|
28445
|
-
command
|
|
28446
|
-
desc: '
|
|
28337
|
+
command,
|
|
28338
|
+
desc: 'Perform a code review on your changes',
|
|
28447
28339
|
builder,
|
|
28448
28340
|
handler: commandExecutor(handler),
|
|
28449
28341
|
options,
|