-
Notifications
You must be signed in to change notification settings - Fork 61
feat: added common embeddings providers components #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Rutik7066
wants to merge
37
commits into
golemcloud:main
Choose a base branch
from
Rutik7066:embed
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 33 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
09b7c23
refactor:moved all llm packages to "golem-llm" folder and updated CI …
Rutik7066 4d0ed25
ci fix
Rutik7066 e358a21
CI fixes
Rutik7066 e78d6ad
added embed
Rutik7066 3fc5f48
openai client generate embedings
Rutik7066 18bcc0a
wip
Rutik7066 421703f
fix
Rutik7066 739e108
wip
Rutik7066 5b63d0c
wip
Rutik7066 da96284
cohere generate
Rutik7066 a71efee
init hugging_face
Rutik7066 a70afbf
wip
Rutik7066 de4c3f4
wip
Rutik7066 07e2ca9
wip
Rutik7066 37f30d3
durability
Rutik7066 62a0ba3
fixes
Rutik7066 09572e1
test
Rutik7066 a9a6634
fixes
Rutik7066 815e38d
hf
Rutik7066 9a8e033
testing & fixing
Rutik7066 a6a4683
build fix
Rutik7066 b004994
fix cohere
Rutik7066 32ab369
fixes
Rutik7066 4c022f1
undo refactor
Rutik7066 1e5432e
clippy
Rutik7066 9f9a6ec
ci fix
Rutik7066 880c527
openai test fix
Rutik7066 bdb3c23
ci fix
Rutik7066 d8aafd8
unit test fix
Rutik7066 664f4c7
clippy
Rutik7066 b3e7dc5
redme and made some fixes
Rutik7066 9753f4b
Merge remote-tracking branch 'origin/main' into embed
Rutik7066 796d7d7
rebased with latest project structure
Rutik7066 7e76583
fixes
Rutik7066 f4f71c7
ci fixes
Rutik7066 16a36da
removed println
Rutik7066 5818aee
lint
Rutik7066 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
[config] | ||
default_to_workspace = false | ||
skip_core_tasks = true | ||
|
||
[tasks.build] | ||
run_task = { name = [ | ||
"build-openai", | ||
"build-cohere", | ||
"build-hugging-face", | ||
"build-voyageai", | ||
] } | ||
|
||
[tasks.build-portable] | ||
run_task = { name = [ | ||
"build-openai-portable", | ||
"build-cohere-portable", | ||
"build-hugging-face-portable", | ||
"build-voyageai-portable", | ||
] } | ||
|
||
[tasks.release-build] | ||
run_task = { name = [ | ||
"release-build-openai", | ||
"release-build-cohere", | ||
"release-build-hugging-face", | ||
"release-build-voyageai", | ||
] } | ||
|
||
[tasks.release-build-portable] | ||
run_task = { name = [ | ||
"release-build-openai-portable", | ||
"release-build-cohere-portable", | ||
"release-build-hugging-face-portable", | ||
"release-build-voyageai-portable", | ||
] } | ||
|
||
[tasks.build-openai] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-openai"] | ||
|
||
[tasks.build-openai-portable] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-openai", "--no-default-features"] | ||
|
||
[tasks.build-cohere] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-cohere"] | ||
|
||
[tasks.build-cohere-portable] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-cohere", "--no-default-features"] | ||
|
||
[tasks.build-hugging-face] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-hugging-face"] | ||
|
||
[tasks.build-hugging-face-portable] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-hugging-face", "--no-default-features"] | ||
|
||
[tasks.build-voyageai] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-voyageai"] | ||
|
||
[tasks.build-voyageai-portable] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-voyageai", "--no-default-features"] | ||
|
||
[tasks.release-build-openai] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-openai", "--release"] | ||
|
||
[tasks.release-build-openai-portable] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-openai", "--release", "--no-default-features"] | ||
|
||
[tasks.release-build-cohere] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-cohere", "--release"] | ||
|
||
[tasks.release-build-cohere-portable] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-cohere", "--release", "--no-default-features"] | ||
|
||
[tasks.release-build-hugging-face] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-hugging-face", "--release"] | ||
|
||
[tasks.release-build-hugging-face-portable] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-hugging-face", "--release", "--no-default-features"] | ||
|
||
[tasks.release-build-voyageai] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-voyageai", "--release"] | ||
|
||
[tasks.release-build-voyageai-portable] | ||
install_crate = { crate_name = "cargo-component", version = "0.20.0" } | ||
command = "cargo-component" | ||
args = ["build", "-p", "golem-embed-voyageai", "--release", "--no-default-features"] | ||
|
||
[tasks.wit-update] | ||
install_crate = { crate_name = "wit-deps-cli" } | ||
command = "wit-deps" | ||
args = ["update"] | ||
|
||
[tasks.wit] | ||
dependencies = ["wit-update"] | ||
|
||
script_runner = "@duckscript" | ||
script = """ | ||
modules = array embed embed-openai embed-cohere embed-hugging-face embed-voyageai | ||
|
||
for module in ${modules} | ||
rm -r ${module}/wit/deps | ||
mkdir ${module}/wit/deps/golem-embed | ||
cp wit/golem-embed.wit ${module}/wit/deps/golem-embed/golem-embed.wit | ||
cp wit/deps/wasi:io ${module}/wit/deps | ||
|
||
echo "Copied WIT for module embed::${module}" | ||
end | ||
|
||
# Copy WIT files for integration tests | ||
rm -r test/wit | ||
mkdir test/wit/deps/golem-embed | ||
mkdir test/wit/deps/io | ||
cp wit/golem-embed.wit test/wit/deps/golem-embed/golem-embed.wit | ||
cp wit/deps/wasi:io/error.wit test/wit/deps/io/error.wit | ||
cp wit/deps/wasi:io/poll.wit test/wit/deps/io/poll.wit | ||
cp wit/deps/wasi:io/streams.wit test/wit/deps/io/streams.wit | ||
cp wit/deps/wasi:io/world.wit test/wit/deps/io/world.wit | ||
|
||
echo "Copied WIT for module test" | ||
""" | ||
|
||
[tasks.build-test-components] | ||
dependencies = ["build"] | ||
install_crate = "cargo-binstall" | ||
description = "Builds embed test components with golem-cli" | ||
script = ''' | ||
cargo-binstall golem-cli@1.2.2-dev.11 --locked --no-confirm | ||
cargo-binstall wac-cli --locked --no-confirm | ||
cd test | ||
|
||
golem-cli --version | ||
golem-cli app clean | ||
golem-cli app build -b openai-debug | ||
golem-cli app clean | ||
golem-cli app build -b cohere-debug | ||
golem-cli app clean | ||
golem-cli app build -b hugging-face-debug | ||
golem-cli app clean | ||
golem-cli app build -b voyageai-debug | ||
''' |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.