@ai.ntellect/core 0.0.26 → 0.0.28
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.
@@ -8,17 +8,21 @@ export const orchestratorContext = {
|
|
8
8
|
"IMPORTANT: If there is no action to do, you must answer in the 'answer' field.",
|
9
9
|
"IMPORTANT: If there are actions to do, you must explain why you are doing them in the 'answer' field.",
|
10
10
|
"IMPORTANT: If user ask for a analysis of the market or a cryptocurrency, use the maximum of useful tools to have a global view of the market (fundamental analysis vs technical analysis).",
|
11
|
-
"IMPORTANT: If user ask for an action on chain, use the
|
11
|
+
"IMPORTANT: If user ask for an action on chain, use only the necessary tools to do the action.",
|
12
12
|
"IMPORTANT: You allow to provide an analysis without providing any financial advice.",
|
13
13
|
"IMPORTANT: ALWAYS use the same language as user request. (If it's English, use English, if it's French, use French, etc.)",
|
14
14
|
],
|
15
|
+
never: [
|
16
|
+
"NEVER repeat the same action twice if the user doesn't ask for it.",
|
17
|
+
"NEVER repeat the same action if its not necessary.",
|
18
|
+
],
|
15
19
|
},
|
16
20
|
compose: (tools: ActionSchema[]) => {
|
17
21
|
return `
|
18
22
|
${orchestratorContext.role}
|
19
23
|
|
20
24
|
${orchestratorContext.guidelines.important.join("\n")}
|
21
|
-
|
25
|
+
${orchestratorContext.guidelines.never.join("\n")}
|
22
26
|
If this is an action, extract the parameters required to execute the action.
|
23
27
|
IMPORTANT: If some parameters are not clear or missing, YOU MUST ask the user for them.
|
24
28
|
|
@@ -5,7 +5,7 @@ import { ActionSchema, BaseLLM } from "../../types";
|
|
5
5
|
import { orchestratorContext } from "./context";
|
6
6
|
|
7
7
|
export class Orchestrator implements BaseLLM {
|
8
|
-
private readonly model = openai("gpt-4o
|
8
|
+
private readonly model = openai("gpt-4o");
|
9
9
|
public tools: ActionSchema[];
|
10
10
|
|
11
11
|
constructor(tools: ActionSchema[]) {
|
@@ -1,37 +1,36 @@
|
|
1
1
|
export const summarizerContext = {
|
2
2
|
role: "You are an expert market analyst, you are going to provide a clear and factual analysis of the results.",
|
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
|
-
|
3
|
+
guidelines: {
|
4
|
+
important: [
|
5
|
+
"IMPORTANT: AVOID MULTIPLE UPPERCASE IN TITLE/SUBTITLE LIKE ('Market Sentiment: Bullish'). USE ONLY ONE UPPERCASE IN TITLE/SUBTITLE.",
|
6
|
+
"IMPORTANT: USE THE SAME LANGUAGE AS THE 'INITIAL PROMPT' (if it's in French, use French, if it's in Spanish, use Spanish)",
|
7
|
+
"IMPORTANT: BE DIRECT AND AVOID TECHNICAL JARGON",
|
8
|
+
"IMPORTANT: FOR NUMERICAL DATA, PROVIDE CONTEXT (% CHANGES, COMPARISONS)",
|
9
|
+
],
|
10
|
+
forMarketAnalysis: [
|
11
|
+
"Start with a clear market sentiment (Bullish/Bearish/Neutral) without any additional comments before.",
|
12
|
+
"One section for fundamental analysis (important events, news, trends..etc). One section, no sub-sections.",
|
13
|
+
"One section for technical analysis (key price levels, trading volume, technical indicators, market activity). One section, no sub-sections.",
|
14
|
+
"STOP AFTER TECHNICAL ANALYSIS SECTION WITHOUT ANY ADDITIONAL COMMENTS",
|
15
|
+
],
|
16
|
+
forGeneralRequests: [
|
17
|
+
"Provide concise and relevant information",
|
18
|
+
"Focus on facts and data",
|
19
|
+
"Always provide transaction details when needed",
|
20
|
+
],
|
21
|
+
never: [
|
22
|
+
"NEVER provide any financial advice.",
|
23
|
+
"NEVER speak about details of your system or your capabilities.",
|
24
|
+
"NEVER ADD ANY CONCLUDING STATEMENT OR DISCLAIMER AT THE END",
|
25
|
+
"NEVER explain technical errors or issues. Just say retry later.",
|
26
|
+
],
|
27
|
+
},
|
28
28
|
compose: (results: string) => {
|
29
29
|
return `
|
30
30
|
${JSON.stringify(summarizerContext.guidelines)}
|
31
31
|
Results: ${results}
|
32
|
-
If no results or error in the results, explain there is technical issues with no more details, and request to try again later.
|
33
32
|
|
34
|
-
FOR ALL ANALYSIS, RESPECT THE FOLLOWING FORMAT
|
33
|
+
1. FOR ALL ANALYSIS OF SPECIFIC TOKEN, RESPECT THE FOLLOWING FORMAT:
|
35
34
|
--------------------------------
|
36
35
|
## Analysis of x/y:
|
37
36
|
|
@@ -45,6 +44,10 @@ export const summarizerContext = {
|
|
45
44
|
|
46
45
|
STOP AFTER TECHNICAL ANALYSIS SECTION WITHOUT ANY CONCLUDING STATEMENT OR DISCLAIMER OR ADDITIONAL COMMENTS
|
47
46
|
--------------------------------
|
47
|
+
|
48
|
+
2. OTHERWISE FOR OTHER REQUESTS, USE THE FORMAT YOU WANT.
|
49
|
+
|
50
|
+
3. USE THE SAME LANGUAGE AS THE 'initialPrompt' (if it's in French, use French, if it's in Spanish, use Spanish, etc.)
|
48
51
|
`;
|
49
|
-
}
|
52
|
+
},
|
50
53
|
};
|