+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
29 changes: 9 additions & 20 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,29 +80,16 @@ jobs:
EOF
- name: Install rust target
run: rustup target add $TARGET
- name: List contents of the repository
run: ls -la
- name: Print current working directory
run: pwd
- name: change path
run: cd fluent_cli/
- name: List contents of the repository
run: ls -la
- name: Install wasm-bindgen-cli
if: matrix.TARGET == 'wasm32-unknown-unknown'
run: cargo install wasm-bindgen-cli
- name: Run build
run: |
if [[ $TARGET == "wasm32-unknown-unknown" ]]; then
cargo build --release --target $TARGET --manifest-path fluent_cli/Cargo.toml
wasm-bindgen --out-dir ./artifacts --target web fluent_cli/target/$TARGET/release/fluent.wasm
cargo build --release --target $TARGET --manifest-path Cargo.toml
wasm-bindgen --out-dir ./artifacts --target web ./target/$TARGET/release/fluent.wasm
else
cargo build --release --verbose --target $TARGET --manifest-path fluent_cli/Cargo.toml
cargo build --release --verbose --target $TARGET --manifest-path Cargo.toml
fi
- name: List contents of the repository
run: ls -lh fluent_cli/target
- name: List fluent_cli/target
run: find fluent_cli/target
- name: Check built files
run: find ./target/$TARGET/release/
- name: Compress
run: |
mkdir -p ./artifacts
Expand All @@ -119,8 +106,10 @@ jobs:
if [[ $TARGET == "wasm32-unknown-unknown" ]]; then
tar -czf ./artifacts/$NAME-$TARGET-$TAG.tar.gz -C ./artifacts .
else
mv fluent_cli/target/$TARGET/release/$EXEC ./$EXEC
tar -czf ./artifacts/$NAME-$TARGET-$TAG.tar.gz $EXEC fluent_cli/config.json amber.yaml amber-x86_64-apple-darwin amber-x86_64-pc-windows-gnu.exe amber-x86_64-unknown-linux-musl fluent_cli/fluent_cli_autocomplete.ps1 fluent_cli/fluent_cli_autocomplete.sh fluent_cli/windows-amber-key-setup.bat
# Debugging: Check if the file exists before moving
ls -alh ./target/$TARGET/release/
mv ./target/$TARGET/release/$EXEC $EXEC
tar -czf ./artifacts/$NAME-$TARGET-$TAG.tar.gz $EXEC default_config_test.json amber.yaml amber-x86_64-apple-darwin amber-x86_64-pc-windows-gnu.exe amber-x86_64-unknown-linux-musl fluent_autocomplete.ps1 fluent_autocomplete.sh
fi
- name: Archive artifact
uses: actions/upload-artifact@v2
Expand Down
27 changes: 27 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "fluent"
version = "0.1.0"
edition = "2021"

[workspace]
members = [
"crates/fluent-cli",
"crates/fluent-core",
"crates/fluent-engines",
"crates/fluent-storage",
]

[dependencies]
fluent-cli = { path = "crates/fluent-cli" }
fluent-core = { path = "crates/fluent-core" }
fluent-engines = { path = "crates/fluent-engines" }
fluent-storage = { path = "crates/fluent-storage" }

tokio = { version = "1", features = ["full"] }
clap = { version = "4.5.8", features = ["derive"] }
anyhow = "1.0"
env_logger = "0.11.3"

neo4rs = "0.7.1"
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1.3", features = ["v4", "serde"] }
13 changes: 11 additions & 2 deletions amber.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@ secrets:
- name: AMBER_FLUENT_LEONARDO_AI_PHOENIX_MODEL_ID
sha256: 9061421f0c33fb6a1f55dc9db499b0e3eacde48b8beb031ac88df9ab602d9e84
cipher: 021c8569f935450f7b4c6a20ad18ddaf4955fb8d47543c2ee118bdc20312c8547e3a6ede1f3e27e3b6f662e092ea7bc908f2f1d5d523d5a2350393a3f1991bb89d09b1360699e75660e72f3f000bb81013db5b85
- name: AMBER_FLUENT_LEONARDO_API_KEY
sha256: b2747090234f8ee870f1193dbc105e944072c9604d23f4a8163c807e13800334
cipher: 3539cbe0fe12c63ed69257819936d3f9ddbd85df1e292759c13a998fc54be7410ce04032120ee7b6a35e7b20f6b9874e46e50c6daeba0a1d6ad043a25f755a623186c44cd4162b0adfbdc6a58f2ad2f5a2d04784
- name: AMBER_FLUENT_MISTRAL_KEY_01
sha256: 9731bc831969cfa36c45cbd7fb6b757c9cfbba91a96a64a847f9b6205d84fd2a
cipher: 1c0bd5f0a66ee85221bbd179cf342b191105e36413a90d3740a6e5c5ef716939df7144ebb1a1bbb9eb068664c76c335bc455c6bfe6b3ebb7bc40fdcea97cb4e4ce46eef06d95f127ecafe3a985a0ca56
sha256: 7152c5c5e6ee16249878ea2fcc734813cf0649c2f866c73a6f1ccbf6dd16ac51
cipher: b6025ec7057bad1c94f17aae8cf6e768acd3feb9660086064dc557cb74df5e41b112db550e713362fac8c076c73890daeed55c31262ce10c45dc860b2a33a2e2b548a3150c410f65d6a677c1c2adcd07
- name: AMBER_FLUENT_NEO4J_PASSWORD
sha256: 7054021eabea77aa418fcc6977470bd628257ccbceb9213b4c35a10d8ed27c9e
cipher: 5658edb7568ddbea0e471299a06e68402e4a40055a257e89f6d097624c305b57fcef9dee5cd646a8d30463fb1ef2e2a70cbc869d271f8bd1bf9641
- name: AMBER_FLUENT_OPENAI_API_KEY_01
sha256: 50955d905232e8fb90d164e87fbf4a3fd49186a3220ef1b3197bf64725340483
cipher: 1e43625a3ec5ed6745201b5b0d7cee6205ff8633365f5b8f4449e536894b9d73de2d9ca36c8a18e2bba1bbade5aaaccec538105780a5c3b3a96f683401d4f6c0bb247e7ff8ef45e5705772971110c300124fc2ec51e3ae209e8abe880f45b5ed1ca766
Expand Down Expand Up @@ -76,6 +82,9 @@ secrets:
- name: AMBER_FLUENT_VECTARA_KEY_01
sha256: b7cbc66542fdbd41da48c288be3b20f48701c2e34fe34093567e7f77f5fc20f4
cipher: d785379e4e9af7dcb3884605f3e92b92b0402013fb07639585fb16274136d863c0f67bcaceb182aeb2ab3d0222a88d8f36fc4b792d64b269101911affab1754f3b60faf724d75f8df17a0d2c338be72f81f76e48b7a685533b5e
- name: AMBER_FLUENT_VOYAGE_AI_KEY
sha256: aacd47d88a71eb2fa318371bfa51f6902e8f871d0d67c240f2ea419456f4728a
cipher: 038f19b1a2da37a22ce8ad0490c88e8c22b1daa62fa52d566e5d855d4e831067e498e23ab7c62bc81aad60521e5ecbcd181dba843f320a1dadf290805d958b0e2410117e046f260d3a890b52ec12a241030196d4793ebb17c4ec19dbcd1a
- name: AMBER_FLUENT_ZEP_MEMORY_KEY_01
sha256: 136bb9b51f44dc40238834475695f11c40970fccdeb4ab27766e6f7a405c32f1
cipher: 7b5fc863ce222f5baae691a2dae429026f373e2f6729300902dca3ec147bb86ecea0115e4e0427e5ae50911ae032e7bc910c89d4a97b3807564b593b0d8dd1082eb8123a8c6d75b4e8cc4907d1baea92d1cc0098926a92573a759e0037f03fe41df653fad556301e81b734e2f1e7d2923ad75e1a5f1d818f7aeda805aa88b533b2e7b21d785d99182bf436936011c64e4063be5f609e0ba57c43d456cee39e3f3853b368cae7b2138cf75a87d08129cf99a7a3e1ef222f24bad87b992b9ee8e3c57721a481
Expand Down
23 changes: 23 additions & 0 deletions code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# Output file
output_file="source_compilation.txt"

# Clear the output file if it exists or create it if it doesn't
> "$output_file"

# Function to process files
process_files() {
local dir="$1"
find "$dir" -type f \( -name "*.rs" -o -name "*.toml" \) | while read -r file; do
echo "#### START OF FILE: $file ####" >> "$output_file"
cat "$file" >> "$output_file"
echo -e "\n#### END OF FILE: $file ####\n" >> "$output_file"
done
}

# Process the src/ and crates/ directories
process_files "src"
process_files "crates"

echo "All .rs and .toml files have been compiled into $output_file"
50 changes: 50 additions & 0 deletions config_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"engines": [
{
"name": "openai",
"engine": "openai",
"connection": {
"protocol": "https",
"hostname": "api.openai.com",
"port": 443,
"request_path": "/v1/chat/completions"
},
"parameters": {
"bearer_token": "AMBER_FLUENT_OPENAI_API_KEY_01",
"modelName": "gpt-4o",
"max_tokens": 150,
"temperature": 1.0,
"top_p": 1,
"n": 1,
"stream": false,
"presence_penalty": 0,
"frequency_penalty": 0
}
},
{
"name": "sonnet",
"engine": "anthropic",
"connection": {
"protocol": "https",
"hostname": "api.anthropic.com",
"port": 443,
"request_path": "/v1/messages"
},
"parameters": {
"sessionID": "NJF890CUSTOM",
"bearer_token": "AMBER_FLUENT_ANTHROPIC_KEY_01",
"max_tokens": 200,
"modelName": "claude-3-5-sonnet-20240620",
"temperature": 0.7,
"system": "You are a helpful AI assistant."
},
"sessionID": "NJF890CUSTOM",
"neo4j": {
"uri": "bolt://localhost:7687",
"user": "neo4j",
"password": "AMBER_FLUENT_NEO4J_PASSWORD",
"database": "neo4j"
}
}
]
}
Binary file added crates/.DS_Store
Binary file not shown.
21 changes: 21 additions & 0 deletions crates/fluent-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "fluent-cli"
version = "0.1.0"
edition = "2021"

[dependencies]
clap = { version = "4.5.8", features = ["derive"] }
fluent-core = { path = "../fluent-core" }
fluent-engines = { path = "../fluent-engines" }
fluent-storage = { path = "../fluent-storage" }

tokio = { version = "1", features = ["full"] }
anyhow = "1.0"
log = "0.4.22"
atty = "0.2.14"
uuid = { version = "1.9.1", features = ["v4"] }
clap_complete = "4.5.1"
serde_json = "1.0.120"
indicatif = "0.17.8"
owo-colors = "3.5.0"
regex = "1.10.5"
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载