From 7d49f97a97603c22b3a82ebf122bf782c72304a9 Mon Sep 17 00:00:00 2001 From: OhOhWonOne <7220+njfio@users.noreply.github.com> Date: Mon, 6 May 2024 22:34:24 -0400 Subject: [PATCH] CI Overhaul: Remove unnecessary complexity and platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit significantly simplifies the CI workflow by focusing on building and testing on the Linux platform. Changes include: • Removal of cross-compilation for various operating systems (macOS and Windows). • Streamlining the workflow to only include build and test stages. • Removal of the deploy stage as it's likely handled elsewhere. • Deletion of platform-specific Amber binaries as they are no longer built. Reason: This change reduces complexity and maintenance overhead while still ensuring core functionality is teste --- fluent_cli/config.json | 23 +++++----- fluent_cli/windows-amber-key-setup.bat | 60 ++++++++++++++++++++++++++ fluent_cli/windows_setup.bat | 53 +++++++++++++++++++++++ 3 files changed, 126 insertions(+), 10 deletions(-) create mode 100644 fluent_cli/windows-amber-key-setup.bat create mode 100644 fluent_cli/windows_setup.bat diff --git a/fluent_cli/config.json b/fluent_cli/config.json index 62a9317..7982b0d 100644 --- a/fluent_cli/config.json +++ b/fluent_cli/config.json @@ -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": "", @@ -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": "", @@ -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", @@ -368,7 +371,7 @@ }, { - "name": "PerplexitySonarMediumOnlineChainRepoCloud", + "name": "PerplexitySonarLargeOnlineChainRepoCloud", "engine": "flowise", "protocol": "https", "hostname": "9d81nz4o.rpcld.co", @@ -379,7 +382,7 @@ "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, diff --git a/fluent_cli/windows-amber-key-setup.bat b/fluent_cli/windows-amber-key-setup.bat new file mode 100644 index 0000000..a2aa7e6 --- /dev/null +++ b/fluent_cli/windows-amber-key-setup.bat @@ -0,0 +1,60 @@ +@echo off +setlocal enabledelayedexpansion + +:: Define API keys and their corresponding URLs +set "AMBER_FLUENT_SESSION_ID_01=" +set "AMBER_ANOTHERWEBSERVICE_NJF=" +set "AMBER_LOCAL_FLUENT_DEFAULT_KEY=" +set "AMBER_REPO_CLOUD_FLUENT_DEMO_KEY=" +set "AMBER_FLUENT_ANTHROPIC_KEY_01=https://console.anthropic.com/settings/keys" +set "AMBER_FLUENT_GROQ_API_KEY_01=https://console.groq.com/keys" +set "AMBER_FLUENT_MISTRAL_KEY_01=https://console.mistral.ai/api-keys/" +set "AMBER_FLUENT_OPENAI_API_KEY_01=https://platform.openai.com/api-keys" +set "AMBER_FLUENT_PERPLEXITY_API_KEY_01=https://www.perplexity.ai/settings/api" +set "AMBER_FLUENT_GEMINI_API_KEY_01=https://ai.google.dev/" +set "AMBER_FLUENT_COHERE_API_KEY_01=https://dashboard.cohere.com/api-keys" +set "AMBER_FLUENT_HUGGINGFACE_API_KEY_01=https://huggingface.co/settings/tokens" +set "AMBER_FLUENT_REPLICATE_API_KEY_01=https://replicate.com/account/api-tokens" +set "AMBER_FLUENT_PINECONE_API_KEY_01=https://app.pinecone.io/..." +set "AMBER_FLUENT_SEARCHAPI_KEY_ID_01=https://www.searchapi.io/" +set "AMBER_FLUENT_SERPAPI_KEY_01=https://serpapi.com/manage-api-key" +set "AMBER_FLUENT_ZEP_MEMORY_KEY_01=https://app.getzep.com/projects/" +set "AMBER_LEONARDO_AI_KINO_XL_MODEL_ID=" +set "AMBER_MAKE_LEONARDO_IMAGE_POST=" +set "AMBER_FLUENT_LANGSMITH_KEY_01=https://smith.langchain.com/" +set "AMBER_FLUENT_GITHUB_PAT_KEY_01=https://github.com/settings/tokens" + +:: Array of all API keys +set keys=AMBER_FLUENT_SESSION_ID_01 AMBER_ANOTHERWEBSERVICE_NJF AMBER_LOCAL_FLUENT_DEFAULT_KEY AMBER_REPO_CLOUD_FLUENT_DEMO_KEY AMBER_FLUENT_ANTHROPIC_KEY_01 AMBER_FLUENT_GROQ_API_KEY_01 AMBER_FLUENT_MISTRAL_KEY_01 AMBER_FLUENT_OPENAI_API_KEY_01 AMBER_FLUENT_PERPLEXITY_API_KEY_01 AMBER_FLUENT_GEMINI_API_KEY_01 AMBER_FLUENT_COHERE_API_KEY_01 AMBER_FLUENT_HUGGINGFACE_API_KEY_01 AMBER_FLUENT_REPLICATE_API_KEY_01 AMBER_FLUENT_PINECONE_API_KEY_01 AMBER_FLUENT_SEARCHAPI_KEY_ID_01 AMBER_FLUENT_SERPAPI_KEY_01 AMBER_FLUENT_ZEP_MEMORY_KEY_01 AMBER_LEONARDO_AI_KINO_XL_MODEL_ID AMBER_MAKE_LEONARDO_IMAGE_POST AMBER_FLUENT_LANGSMITH_KEY_01 AMBER_FLUENT_GITHUB_PAT_KEY_01 + +:: Loop through each key +for %%k in (%keys%) do ( + set key=%%k + set url=!%%k! + + powershell -Command "$choice = Read-Host 'Do you want to set the key !key!? (y/n)'; if ($choice -eq 'y') { exit 0 } else { exit 1 }" + if !ERRORLEVEL! EQU 0 ( + if not "!url!"=="" ( + echo Opening the default browser for more info on !key!. + start "" "!url!" + ) + + powershell -Command "$key_value = Read-Host 'Enter the key for !key!'; echo $key_value" + set key_value=!key_value! + + echo Encrypting key for !key!... + amber encrypt !key! "!key_value!" + + echo Key !key! set successfully. + ) else ( + echo Skipping !key!. + ) + + echo. +) + +echo All keys processed. +pause + +:end +endlocal diff --git a/fluent_cli/windows_setup.bat b/fluent_cli/windows_setup.bat new file mode 100644 index 0000000..6026f87 --- /dev/null +++ b/fluent_cli/windows_setup.bat @@ -0,0 +1,53 @@ +@echo off +setlocal + +:: User's home directory variable +set "USER_HOME=c:\users\%USERNAME%" + +:: Path to the directory where the tarball will be extracted +set "EXTRACT_DIR=%USER_HOME%\.fluent_cli" + +:: Extract the tarball +echo Extracting files... +tar -zxvf .\fluent-x86_64-pc-windows-msvc-v.0.3.5.1.tar.gz -C "%EXTRACT_DIR%" + +:: Move the files up one directory level +echo Moving files... +move "%EXTRACT_DIR%\fluent_cli\*" "%EXTRACT_DIR%\" + +:: Remove the now empty directory +echo Cleaning up... +rmdir "%EXTRACT_DIR%\fluent_cli" + +:: Set environment variables +echo Setting environment variables... +setx FLUENT_CLI_CONFIG_PATH "%EXTRACT_DIR%\config.json" +setx AMBER_YAML "%EXTRACT_DIR%\amber.yaml" + +:: Add the extraction directory to the system PATH +set "NEW_PATH=%EXTRACT_DIR%;%PATH%" +setx PATH "%NEW_PATH%" + +:: Ask the user for AMBER_SECRET or if they need to init +echo Please choose an option: +echo 1. Enter AMBER_SECRET +echo 2. Initialize Amber (amber init) +set /p user_option="Enter your choice (1 or 2): " + +if "%user_option%"=="1" ( + set /p AMBER_SECRET="Enter your AMBER_SECRET: " + setx AMBER_SECRET "%AMBER_SECRET%" +) else if "%user_option%"=="2" ( + cd "%EXTRACT_DIR%" + echo Initializing Amber... + amber init + echo Copy that key and now enter it to set the ENV Variable + set /p AMBER_SECRET="Enter your AMBER_SECRET: " + setx AMBER_SECRET "%AMBER_SECRET%" +) + +echo Process completed. +pause + +:end +endlocal