Skip to content

Commit

Permalink
Merge pull request #23 from njfio/v.0.3.5.5-cleanup
Browse files Browse the repository at this point in the history
V.0.3.5.5 cleanup
  • Loading branch information
njfio committed May 8, 2024
2 parents 3053451 + ca13154 commit 2d29963
Show file tree
Hide file tree
Showing 9 changed files with 234 additions and 296 deletions.
3 changes: 2 additions & 1 deletion fluent_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ serde_json = "1.0"
reqwest = { version = "0.11", features = ["json", "blocking", "multipart", "stream"] }
tokio = { version = "1", features = ["full"] }
clap = { version = "3.0", features = ["derive"] }
clap_complete_fig = "3.1"
tokio-console = "0.1" # For debugging async tasks
config = "0.12"
log = "0.4"
env_logger = "0.9"
atty = "0.2.14"
amber = "0.2.0"
base64 = "0.21.7"
base64 = "0.22.1"
infer = "0.8.0"
pulldown-cmark = "0.9.0"
regex = "1.10.4"
Expand Down
54 changes: 43 additions & 11 deletions fluent_cli/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"hostname": "njfio-langflow-preview.hf.space",
"port": 443,
"request_path": "/api/v1/run/",
"chat_id": "0bb3d0a9-87b0-4023-850b-62c4003e5558",
"chat_id": "b711ccd8-fc6f-4faf-acf1-bf155dd29c92?",
"bearer_token": "AMBER_REPO_CLOUD_FLUENT_DEMO_KEY",
"input_value_key": "input_value",
"sessionId": "",
Expand Down Expand Up @@ -158,7 +158,7 @@
"hostname": "njfio-langflow-preview.hf.space",
"port": 443,
"request_path": "/api/v1/run/",
"chat_id": "c33be023-0326-49db-87b4-e52edab31006",
"chat_id": "7455a484-1e7d-46c9-8523-a8b1350d9784",
"bearer_token": "AMBER_REPO_CLOUD_FLUENT_DEMO_KEY",
"input_value_key": "input_value",
"sessionId": "",
Expand All @@ -168,26 +168,29 @@

},
"tweaks": {
"Prompt-SPWIv": {},
"URL-3ptZT": {
"Prompt-sU980": {},
"URL-m0Ust": {
"urls": [
"https://github.com/njfio/fluent_cli"
]
},
"OpenAIModel-E1sw1": {
"OpenAIModel-xHBgn": {
"openai_api_key": "AMBER_FLUENT_OPENAI_API_KEY_01",
"model_name": "gpt-4-turbo-preview"
},
"URL-iMcRn": {
"URL-cJhLd": {
"urls": [
"https://fluentcli.com"
"https://www.fluentcli.com"
]
},
"ChatInput-b5wyA": {
"TextInput-eohW7": {
"input_value": "Use the references above for style to write a new blog/tutorial about FluentCLI. Suggest non-covered topics."
}
},
"timeout_ms": 50000
},


{
"name": "GPTChainRepoCloud",
"engine": "flowise",
Expand Down Expand Up @@ -368,7 +371,7 @@
},

{
"name": "PerplexitySonarMediumOnlineChainRepoCloud",
"name": "PerplexitySonarLargeOnlineChainRepoCloud",
"engine": "flowise",
"protocol": "https",
"hostname": "9d81nz4o.rpcld.co",
Expand All @@ -379,13 +382,14 @@
"bearer_token": "AMBER_REPO_CLOUD_FLUENT_DEMO_KEY",
"overrideConfig": {
"sessionId": "AMBER_FLUENT_SESSION_ID_01",
"modelName": "sonar-medium-online",
"modelName": "llama-3-sonar-large-32k-online",
"openAIApiKey": "AMBER_FLUENT_PERPLEXITY_API_KEY_01",
"allowImageUploads": false,
"temperature": 0.9,
"frequencyPenalty": 0.9,
"systemMessage": "You are a helpful assistant",
"openAIToolAgent_0": {
"systemMessage": "You are a helpful assistant"

}
},
"tweaks": {
Expand Down Expand Up @@ -492,6 +496,34 @@
},
"timeout_ms": 500000
},
{
"name": "GroqLLama370bToolAgentRepoCloud",
"engine": "flowise",
"protocol": "https",
"hostname": "flowise.fluentcli.com",
"port": 443,
"chat_id": "19e0c3b5-d5ff-40aa-bf6a-bc6db22a7a58",
"request_path": "/api/v1/prediction/",
"sessionId": "",
"bearer_token": "AMBER_REPO_CLOUD_FLUENT_DEMO_KEY",
"overrideConfig": {
"sessionId": "AMBER_FLUENT_SESSION_ID_01",
"groqApiKey": "AMBER_FLUENT_GROQ_API_KEY_01",
"serpApiKey": "AMBER_FLUENT_SERPAPI_KEY_01",
"chainName": "groqChain",
"systemMessagePrompt": "You are a helpful assistant",
"temperature": 0.8,
"openAIApiKey": {
"openAIEmbeddings_0": "AMBER_FLUENT_OPENAI_API_KEY_01"
},
"modelName":"llama3-70b-8192",
"memoryKey": "AMBER_FLUENT_SESSION_ID_01"
},
"tweaks": {

},
"timeout_ms": 500000
},
{
"name": "GroqGemma7bAgentRepoCloud",
"engine": "flowise",
Expand Down
44 changes: 22 additions & 22 deletions fluent_cli/functional_tests/functional_test_02.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,52 +76,52 @@ for FLOWNAME in "${FLOWNAMES[@]}"; do
echo ""

run_test "$FLOWNAME" "Base Command Test" \
"$CLI_PATH $FLOWNAME 'This is a test, respond that this is a test'" \
"$CLI_PATH $FLOWNAME 'This is a test, reply this is a test'" \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request is about this is a test'"

run_test "$FLOWNAME" "Stdin Context Test" \
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'Repeat what the context'" \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request has the word northstar or North Star'"
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'This is a test, Summarize this'" \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request references the word northstar or North Star'"

run_test "$FLOWNAME" "Additional Context File Test" \
"$CLI_PATH $FLOWNAME 'Repeat the outline ' --additional-context-file \"$OUTLINE_FILE\"" \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request contains the word TheLardCatFellFlatOnTheMat'"
"$CLI_PATH $FLOWNAME 'This is a test, Summarize what I provide ' --additional-context-file \"$OUTLINE_FILE\"" \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request references the word TheLardCatFellFlatOnTheMat'"

run_test "$FLOWNAME" "Combined Stdin and Additional Context Test" \
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'Repeat what I provide for context, and for the outline'' --additional-context-file \"$OUTLINE_FILE\"" \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request contains TheLardCatFellFlatOnTheMat and talks about the word northstar or North Star'"
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'This is a test, Summarize what I provide: ' --additional-context-file \"$OUTLINE_FILE\"" \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the response contains TheLardCatFellFlatOnTheMat and references the word northstar or North Star'"

run_test "$FLOWNAME" "Base Command Test and --system-prompt-override-inline" \
"$CLI_PATH $FLOWNAME 'This is a test, respond that this is a test' --system-prompt-override-inline 'You can only reply in German'" \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request is about this is a test and is in German'"
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if request is in German'"

run_test "$FLOWNAME" "Stdin Context Test and --system-prompt-override-inline" \
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'Repeat what I provide for context' --system-prompt-override-inline 'You can only reply in German' " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request has the word northstar or North Star and is in German'"
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'This is a test, Summarize what what I provide in the request:' --system-prompt-override-inline 'You can only reply in German' " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request is partly in German'"

run_test "$FLOWNAME" "Additional Context File Test and --system-prompt-override-inline" \
"$CLI_PATH $FLOWNAME 'Repeat what I provide for context, and for the outline' --additional-context-file \"$OUTLINE_FILE\" --system-prompt-override-inline 'You can only reply in German' " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request contains the word TheLardCatFellFlatOnTheMat and is in German'"
"$CLI_PATH $FLOWNAME 'This is a test, Summarize what I provided in the request' --additional-context-file \"$OUTLINE_FILE\" --system-prompt-override-inline 'You can only reply in German' " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request is partly in German'"

run_test "$FLOWNAME" "Combined Stdin and Additional Context Test and --system-prompt-override-inline" \
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'Repeat what I provide for context, and for the outline' --additional-context-file \"$OUTLINE_FILE\" --system-prompt-override-inline 'You can only reply in German'" \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request contains TheLardCatFellFlatOnTheMat and talks about the word northstar or North Star and is in German'"
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'This is a test, Summarize what what I provide in the request' --additional-context-file \"$OUTLINE_FILE\" --system-prompt-override-inline 'You can only reply in German'" \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request is partly in German'"

run_test "$FLOWNAME" "Base Command Test and --system-prompt-override-file" \
"$CLI_PATH $FLOWNAME 'This is a test, respond that this is a test' --system-prompt-override-file \"$SYSTEM_PROMPT_FILE\" " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request is about this is a test and is in Spanish'"
"$CLI_PATH $FLOWNAME 'This is a test, Summarize that this is a test' --system-prompt-override-file \"$SYSTEM_PROMPT_FILE\" " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request has spanish words'"

run_test "$FLOWNAME" "Stdin Context Test and --system-prompt-override-file" \
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'Repeat what I provide for context:' --system-prompt-override-file \"$SYSTEM_PROMPT_FILE\" " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request has the word northstar or North Star and is in Spanish'"
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'This is a test, Summarize what with what I provide in the request ' --system-prompt-override-file \"$SYSTEM_PROMPT_FILE\" " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request has Spanish words'"

run_test "$FLOWNAME" "Additional Context File Test and --system-prompt-override-file" \
"$CLI_PATH $FLOWNAME 'Repeat what I provide for context, and for the outline' --additional-context-file \"$OUTLINE_FILE\" --system-prompt-override-file \"$SYSTEM_PROMPT_FILE\" " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request contains the word TheLardCatFellFlatOnTheMat and is in Spanish'"
"$CLI_PATH $FLOWNAME 'This is a test, Summarize what I provide in the request' --additional-context-file \"$OUTLINE_FILE\" --system-prompt-override-file \"$SYSTEM_PROMPT_FILE\" " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request has Spanish words'"

run_test "$FLOWNAME" "Combined Stdin and Additional Context Test and --system-prompt-override-file" \
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'Repeat what I provide for context, and for the outline' --additional-context-file \"$OUTLINE_FILE\" --system-prompt-override-file \"$SYSTEM_PROMPT_FILE\" " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request contains TheLardCatFellFlatOnTheMat and talks about the word northstar or North Star and is in Spanish'"
"cat \"$CONTEXT_FILE\" | $CLI_PATH $FLOWNAME 'This is a test, Summarize what I provide in the request:' --additional-context-file \"$OUTLINE_FILE\" --system-prompt-override-file \"$SYSTEM_PROMPT_FILE\" " \
"$VALIDATION_CLI $VALIDATION_FLOWNAME 'Answer PASS or FAIL only if the request has Spanish words'"

done

Expand Down
Loading

0 comments on commit 2d29963

Please sign in to comment.