Skip to content

Commit

Permalink
CI Overhaul: Remove unnecessary complexity and platforms
Browse files Browse the repository at this point in the history
    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
  • Loading branch information
njfio committed May 7, 2024
1 parent 94347c2 commit 7d49f97
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 10 deletions.
23 changes: 13 additions & 10 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,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,
Expand Down
60 changes: 60 additions & 0 deletions fluent_cli/windows-amber-key-setup.bat
Original file line number Diff line number Diff line change
@@ -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
53 changes: 53 additions & 0 deletions fluent_cli/windows_setup.bat
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7d49f97

Please sign in to comment.