-
Notifications
You must be signed in to change notification settings - Fork 103
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
feat: Draft ollama test #566
base: dev
Are you sure you want to change the base?
Conversation
WalkthroughA new GitHub Actions workflow file ( Changes
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
.github/workflows/test_ollama.yml (4)
23-26
: Upgrade Setup-Python Action VersionThe workflow uses
actions/setup-python@v4
, but static analysis suggests that this runner version may be outdated. Consider upgrading to a newer version (for example,actions/setup-python@v5
) to benefit from improved performance and bug fixes.🧰 Tools
🪛 actionlint (1.7.4)
24-24: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
52-52
: Remove Trailing SpacesThere are trailing spaces present on this line. Cleaning up the whitespace helps maintain consistency and prevents potential YAML parsing issues.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 52-52: trailing spaces
(trailing-spaces)
59-70
: Align Reusable Workflow SecretsThe reusable workflow (
./.github/workflows/reusable_python_example.yml
) does not define the following secrets:
LLM_PROVIDER
(line 63)LLM_ENDPOINT
(line 64)LLM_MODEL
(line 65)EMBEDDING_PROVIDER
(line 66)EMBEDDING_MODEL
(line 67)EMBEDDING_ENDPOINT
(line 68)EMBEDDING_DIMENSIONS
(line 69)HUGGINGFACE_TOKENIZER
(line 70)Please verify if these secrets are necessary. If they are, update the reusable workflow to accept these inputs; otherwise, consider removing them from the calling workflow.
🧰 Tools
🪛 actionlint (1.7.4)
63-63: secret "LLM_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
64-64: secret "LLM_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
65-65: secret "LLM_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
66-66: secret "EMBEDDING_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
67-67: secret "EMBEDDING_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
68-68: secret "EMBEDDING_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
69-69: secret "EMBEDDING_DIMENSIONS" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
70-70: secret "HUGGINGFACE_TOKENIZER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
🪛 YAMLlint (1.35.1)
[error] 70-70: no new line character at the end of file
(new-line-at-end-of-file)
70-70
: Enforce Newline at End of FileThe file is missing a newline at the end. Adding a newline improves compatibility with various tools and conforms to best practices.
🧰 Tools
🪛 actionlint (1.7.4)
70-70: secret "HUGGINGFACE_TOKENIZER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
🪛 YAMLlint (1.35.1)
[error] 70-70: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test_ollama.yml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/test_ollama.yml
24-24: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
63-63: secret "LLM_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
64-64: secret "LLM_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
65-65: secret "LLM_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
66-66: secret "EMBEDDING_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
67-67: secret "EMBEDDING_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
68-68: secret "EMBEDDING_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
69-69: secret "EMBEDDING_DIMENSIONS" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
70-70: secret "HUGGINGFACE_TOKENIZER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
🪛 YAMLlint (1.35.1)
.github/workflows/test_ollama.yml
[error] 52-52: trailing spaces
(trailing-spaces)
[warning] 55-55: wrong indentation: expected 4 but found 6
(indentation)
[error] 70-70: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (15)
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on macos-13
- GitHub Check: Test on macos-13
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: windows-latest
- GitHub Check: test
- GitHub Check: docker-compose-test
.github/workflows/test_ollama.yml
Outdated
|
||
|
||
run_simple_example_test: | ||
uses: ./.github/workflows/reusable_python_example.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix YAML Indentation
The key at line 55 is indented with 6 spaces while the expected indentation is 4 spaces under the job definition. Adjust the indentation according to YAML standards to avoid parsing errors.
🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 55-55: wrong indentation: expected 4 but found 6
(indentation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/test_ollama.yml (1)
55-70
: 🛠️ Refactor suggestion
⚠️ Potential issueFix YAML Indentation in
run_simple_example_test
JobThe reusable workflow job (
run_simple_example_test
) is mis-indented. The keys under this job (such asuses:
,with:
, andsecrets:
) are indented with 6 spaces instead of the expected 4 spaces relative to the job key. This can cause YAML parsing issues.- uses: ./.github/workflows/reusable_python_example.yml - with: - example-location: ./examples/python/simple_example.py - secrets: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - GRAPHISTRY_USERNAME: ${{ secrets.GRAPHISTRY_USERNAME }} - GRAPHISTRY_PASSWORD: ${{ secrets.GRAPHISTRY_PASSWORD }} - LLM_API_KEY: "ollama" - LLM_PROVIDER: "ollama" - LLM_ENDPOINT: "http://localhost:11434" - LLM_MODEL: "ollama/llama3.2" - EMBEDDING_PROVIDER: "ollama" - EMBEDDING_MODEL: "avr/sfr-embedding-mistral:latest" - EMBEDDING_ENDPOINT: "http://localhost:11434/api/embeddings" - EMBEDDING_DIMENSIONS: 4096 - HUGGINGFACE_TOKENIZER: "Salesforce/SFR-Embedding-Mistral" + uses: ./.github/workflows/reusable_python_example.yml + with: + example-location: ./examples/python/simple_example.py + secrets: + OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + GRAPHISTRY_USERNAME: ${{ secrets.GRAPHISTRY_USERNAME }} + GRAPHISTRY_PASSWORD: ${{ secrets.GRAPHISTRY_PASSWORD }} + LLM_API_KEY: "ollama" + LLM_PROVIDER: "ollama" + LLM_ENDPOINT: "http://localhost:11434" + LLM_MODEL: "ollama/llama3.2" + EMBEDDING_PROVIDER: "ollama" + EMBEDDING_MODEL: "avr/sfr-embedding-mistral:latest" + EMBEDDING_ENDPOINT: "http://localhost:11434/api/embeddings" + EMBEDDING_DIMENSIONS: 4096 + HUGGINGFACE_TOKENIZER: "Salesforce/SFR-Embedding-Mistral"🧰 Tools
🪛 actionlint (1.7.4)
63-63: secret "LLM_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
64-64: secret "LLM_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
65-65: secret "LLM_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
66-66: secret "EMBEDDING_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
67-67: secret "EMBEDDING_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
68-68: secret "EMBEDDING_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
69-69: secret "EMBEDDING_DIMENSIONS" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
70-70: secret "HUGGINGFACE_TOKENIZER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
🪛 YAMLlint (1.35.1)
[warning] 55-55: wrong indentation: expected 4 but found 6
(indentation)
[error] 70-70: no new line character at the end of file
(new-line-at-end-of-file)
🧹 Nitpick comments (3)
.github/workflows/test_ollama.yml (3)
23-27
: Update Setup-Python Action VersionThe workflow currently uses
actions/setup-python@v4
. Static analysis indicates that this version is outdated. It is recommended to update to a newer version (for example,actions/setup-python@v5
) for improved stability and compatibility.- uses: actions/setup-python@v4 + uses: actions/setup-python@v5🧰 Tools
🪛 actionlint (1.7.4)
24-24: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
50-52
: Remove Trailing Spaces in the Embedding Model StepLine 52 contains trailing spaces. Removing these extraneous spaces will improve YAML formatting and avoid linting errors.
- curl -X POST http://localhost:11434/api/pull -d '{"name": "avr/sfr-embedding-mistral:latest"}' - + curl -X POST http://localhost:11434/api/pull -d '{"name": "avr/sfr-embedding-mistral:latest"}'🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 52-52: trailing spaces
(trailing-spaces)
70-70
: Ensure Newline at End of FileThere is no newline at the end of the file, which triggers YAML lint errors. Adding a newline at the end of the file will resolve this issue.
🧰 Tools
🪛 actionlint (1.7.4)
70-70: secret "HUGGINGFACE_TOKENIZER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
🪛 YAMLlint (1.35.1)
[error] 70-70: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test_ollama.yml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/test_ollama.yml
24-24: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
63-63: secret "LLM_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
64-64: secret "LLM_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
65-65: secret "LLM_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
66-66: secret "EMBEDDING_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
67-67: secret "EMBEDDING_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
68-68: secret "EMBEDDING_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
69-69: secret "EMBEDDING_DIMENSIONS" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
70-70: secret "HUGGINGFACE_TOKENIZER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
🪛 YAMLlint (1.35.1)
.github/workflows/test_ollama.yml
[error] 52-52: trailing spaces
(trailing-spaces)
[warning] 55-55: wrong indentation: expected 4 but found 6
(indentation)
[error] 70-70: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (21)
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: test
- GitHub Check: windows-latest
- GitHub Check: run_dynamic_steps_example_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_simple_example_test / test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: docker-compose-test
🔇 Additional comments (4)
.github/workflows/test_ollama.yml (4)
1-7
: Workflow Metadata and Trigger Configuration ApprovedThe workflow name and event triggers are clearly defined. The manual dispatch and pull request triggers are appropriate for the intended testing.
28-35
: Cache Pip Packages Step Looks GoodThe configuration for caching pip packages is set up correctly to speed up subsequent runs.
36-45
: Dependency Installation and Ollama Readiness Check are CorrectBoth the dependency installation step and the loop waiting for the Ollama service to be ready are implemented properly.
46-49
: Pull Model Step VerifiedThe step to pull the model via the API is clear and syntactically correct.
.github/workflows/test_ollama.yml
Outdated
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
GRAPHISTRY_USERNAME: ${{ secrets.GRAPHISTRY_USERNAME }} | ||
GRAPHISTRY_PASSWORD: ${{ secrets.GRAPHISTRY_PASSWORD }} | ||
LLM_API_KEY: "ollama" | ||
LLM_PROVIDER: "ollama" | ||
LLM_ENDPOINT: "http://localhost:11434" | ||
LLM_MODEL: "ollama/llama3.2" | ||
EMBEDDING_PROVIDER: "ollama" | ||
EMBEDDING_MODEL: "avr/sfr-embedding-mistral:latest" | ||
EMBEDDING_ENDPOINT: "http://localhost:11434/api/embeddings" | ||
EMBEDDING_DIMENSIONS: 4096 | ||
HUGGINGFACE_TOKENIZER: "Salesforce/SFR-Embedding-Mistral" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify Consistency of Provided Secrets with Reusable Workflow
The secrets specified in the run_simple_example_test
job (such as LLM_PROVIDER
, LLM_ENDPOINT
, LLM_MODEL
, EMBEDDING_PROVIDER
, EMBEDDING_MODEL
, EMBEDDING_ENDPOINT
, EMBEDDING_DIMENSIONS
, and HUGGINGFACE_TOKENIZER
) are not defined in the referenced reusable workflow (./.github/workflows/reusable_python_example.yml
). Please confirm whether these secrets are required. If they are intended for use in the reusable workflow, update its definition accordingly; otherwise, consider removing them.
🧰 Tools
🪛 actionlint (1.7.4)
63-63: secret "LLM_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
64-64: secret "LLM_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
65-65: secret "LLM_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
66-66: secret "EMBEDDING_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
67-67: secret "EMBEDDING_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
68-68: secret "EMBEDDING_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
69-69: secret "EMBEDDING_DIMENSIONS" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
70-70: secret "HUGGINGFACE_TOKENIZER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
🪛 YAMLlint (1.35.1)
[error] 70-70: no new line character at the end of file
(new-line-at-end-of-file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (6)
.github/workflows/test_ollama.yml (6)
21-24
: Upgrade the Python setup action version.
The workflow currently usesactions/setup-python@v4
, which is flagged as outdated. Upgrading to a newer version (e.g.,@v5
) can provide improved features, bug fixes, and security improvements.- - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.x" + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x"🧰 Tools
🪛 actionlint (1.7.4)
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
37-48
: Review the Ollama readiness loop.
The loop that checks if the Ollama service is ready works as expected but consider adding more specific logging or error details upon failure. In the long term, you might also evaluate using a dedicated “wait-for” action to reduce maintenance effort.
50-54
: Enhance error handling for model pulling.
The twocurl
commands used to pull models assume successful execution. It would be beneficial to check the HTTP response status for each command to handle potential failures, ensuring that an error in pulling one model does not go unnoticed.
68-72
: Upgrade the Python setup action in the test job.
Similar to the setup-ollama job, therun_simple_example_test
job usesactions/setup-python@v4
. Upgrading to@v5
is recommended for consistency and to take advantage of the latest fixes and features.- - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.x" + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x"🧰 Tools
🪛 actionlint (1.7.4)
69-69: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
78-90
: Consider reducing duplication in the readiness check.
Both jobs contain an almost identical loop to wait for the Ollama service. Extracting this logic into a reusable script or action might improve maintainability and reduce code duplication over time.
92-105
: Validate environment variables and file formatting.
- The environment variable block specifies several keys (e.g.,
LLM_PROVIDER
,EMBEDDING_ENDPOINT
, etc.). Please verify these variables are correctly defined and needed for your downstream process or reusable workflows.- YAMLlint reports that there is no newline at the end of the file (line 105). Adding a newline at the end will improve POSIX compliance and prevent potential parsing issues.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 105-105: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test_ollama.yml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/test_ollama.yml
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
69-69: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
.github/workflows/test_ollama.yml
[error] 105-105: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (16)
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on macos-13
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on macos-13
- GitHub Check: Test on macos-15
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-13
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: test
- GitHub Check: windows-latest
- GitHub Check: docker-compose-test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.github/workflows/test_ollama.yml (3)
82-90
: Review duplicate dependency installation steps.
In therun_simple_example_test
job, there are two separate steps for installing dependencies—one using Poetry (lines 75–81) and another using pip (lines 86–90). Please verify if both are required. If not, consider consolidating them to reduce redundancy and potential conflicts.
39-50
: Consolidate repetitive Ollama readiness checks.
Both thesetup-ollama
job (lines 39–50) and therun_simple_example_test
job (lines 91–102) use an identical loop to wait for the Ollama service to be ready. It would improve maintainability to abstract this waiting logic into a reusable script or action, thereby reducing code duplication.Also applies to: 91-102
118-118
: Add a newline at the end of the file.
To comply with YAML linting standards, please ensure that the file ends with a newline character.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 118-118: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test_ollama.yml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/test_ollama.yml
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
.github/workflows/test_ollama.yml
[error] 118-118: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (29)
- GitHub Check: run_simple_example_test
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: run_notebook_test / test
- GitHub Check: run_networkx_metrics_test / test
- GitHub Check: run_dynamic_steps_example_test / test
- GitHub Check: run_simple_example_test / test
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_multimedia_example_test / test
- GitHub Check: test
- GitHub Check: run_notebook_test / test
- GitHub Check: test
- GitHub Check: Test on macos-13
- GitHub Check: test
- GitHub Check: run_eval_framework_test / test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: test
- GitHub Check: windows-latest
- GitHub Check: docker-compose-test
- GitHub Check: Build Cognee Backend Docker App Image
🔇 Additional comments (1)
.github/workflows/test_ollama.yml (1)
106-117
: Verify secret definitions for environment variables.
TheRun example test
step sets several environment variables (such asLLM_PROVIDER
,LLM_ENDPOINT
,LLM_MODEL
,EMBEDDING_PROVIDER
, and others). Please ensure that these values are either defined as repository secrets or are consistent with any referenced reusable workflows. Consider revisiting their necessity if they conflict with secret definitions in other workflow files.
.github/workflows/test_ollama.yml
Outdated
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Update the Python setup action version.
The actions/setup-python@v4
action used in the setup-ollama
job is outdated. It is advisable to update this to a newer version (for example, actions/setup-python@v5
) to ensure better compatibility and take advantage of recent improvements.
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" |
🧰 Tools
🪛 actionlint (1.7.4)
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
.github/workflows/test_ollama.yml (1)
21-24
: 🛠️ Refactor suggestionUpdate Setup Python Version in setup-ollama Job.
Please updateactions/setup-python@v4
toactions/setup-python@v5
for consistency with the later job and to benefit from the latest improvements.- uses: actions/setup-python@v4 + uses: actions/setup-python@v5🧰 Tools
🪛 actionlint (1.7.4)
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🧹 Nitpick comments (2)
.github/workflows/test_ollama.yml (2)
82-90
: Consolidate Dependency Installation Steps in run_simple_example_test.
The job currently installs dependencies in two separate steps—first via Poetry (lines 82-85) and then with pip (lines 86-90). Please verify if both are required. If not, consider consolidating or removing the redundant step(s) to improve clarity and efficiency.
124-124
: Ensure a Newline at End of File.
The file appears to be missing a newline at the end. Adding a newline is a standard best practice to avoid potential issues with some tools.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 124-124: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test_ollama.yml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/test_ollama.yml
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
.github/workflows/test_ollama.yml
[error] 124-124: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (29)
- GitHub Check: run_simple_example_test
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: run_multimedia_example_test / test
- GitHub Check: run_eval_framework_test / test
- GitHub Check: Test on macos-13
- GitHub Check: Test on macos-13
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: run_networkx_metrics_test / test
- GitHub Check: run_dynamic_steps_example_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_simple_example_test / test
- GitHub Check: test
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-13
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: windows-latest
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: test
- GitHub Check: test
- GitHub Check: docker-compose-test
- GitHub Check: Build Cognee Backend Docker App Image
🔇 Additional comments (1)
.github/workflows/test_ollama.yml (1)
111-123
: Verify Environment Variable Consistency for the Example Test.
TheRun example test
step sets several environment variables (e.g.,LLM_PROVIDER
,LLM_ENDPOINT
,EMBEDDING_MODEL
, etc.). Please ensure these values align with any expectations in the reusable workflow definitions or downstream scripts. Consistency here is crucial for a smooth integration and correct behavior of the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/test_ollama.yml (1)
21-24
: 🛠️ Refactor suggestionConsider Updating the Python Setup Action Version
The
setup-ollama
job is still usingactions/setup-python@v4
, whereas therun_simple_example_test
job usesactions/setup-python@v5
. For consistency and improved compatibility, update this step to useactions/setup-python@v5
.🧰 Tools
🪛 actionlint (1.7.4)
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🧹 Nitpick comments (3)
.github/workflows/test_ollama.yml (3)
52-56
: Consider Adding Error Handling in the Pull Models StepWhile the model pull commands are succinct, it might be beneficial to verify the response status of the
curl
commands to log or handle failures if the pull requests are unsuccessful.
86-91
: Duplicate Dependency Installation Steps DetectedThere are two "Install dependencies" steps: one using
poetry install --no-interaction --all-extras
and another that upgrades pip and installs additional packages with Poetry. Consider consolidating these to streamline the setup process. If these extra dependencies (i.e.ollama-python
,requests
, andtransformers
) are required only for this job, ensure they are declared in the project’s dependency files or usepoetry add
for clarity.
105-109
: Docker Logs Dump Step is Useful for DiagnosticsDumping Docker logs helps with troubleshooting if the service fails. Consider adding error handling if no container ID is returned to prevent the command from failing unexpectedly.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test_ollama.yml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/test_ollama.yml
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
.github/workflows/test_ollama.yml
[error] 125-125: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (29)
- GitHub Check: run_simple_example_test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_simple_example_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_networkx_metrics_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on macos-15
- GitHub Check: run_dynamic_steps_example_test / test
- GitHub Check: Test on macos-15
- GitHub Check: run_eval_framework_test / test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: run_multimedia_example_test / test
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on macos-13
- GitHub Check: windows-latest
- GitHub Check: test
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: test
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Build Cognee Backend Docker App Image
- GitHub Check: docker-compose-test
🔇 Additional comments (13)
.github/workflows/test_ollama.yml (13)
1-7
: Workflow Trigger Configuration Looks GoodThe workflow trigger block correctly enables manual dispatch (via
workflow_dispatch
) and pull request triggers for the specified event types.
8-16
: Service Container Setup is CorrectThe
setup-ollama
job efficiently uses a service container with theollama/ollama
image and correctly maps port 11434.
17-20
: Repository Checkout Step is StandardThe checkout step uses the recommended
actions/checkout@v4
action, ensuring the repository is properly checked out for the job’s subsequent steps.
25-33
: Cache Pip Packages Configuration is SolidThe caching step appropriately uses the hash of the requirements file to generate a cache key, which should positively impact subsequent runs.
34-38
: Install Dependencies Step is ClearThe commands upgrade pip and install
ollama-python
andrequests
as needed. Ensure these are the only dependencies required for the initial environment setup.
39-51
: Ollama Readiness Check is Well-ImplementedThe retry loop for checking Ollama’s readiness (up to 30 attempts with a 2-second delay) is robust and ensures the service is up before proceeding.
57-65
: Jobrun_simple_example_test
Configuration is Well-DefinedThe job’s dependency on
setup-ollama
and its service container configuration are clearly specified, ensuring a consistent testing environment.
66-69
: Repository Checkout Step is ConsistentThe checkout step in this job follows best practices and ensures the codebase is available for subsequent steps.
70-74
: Updated Python Setup Step is in UseUsing
actions/setup-python@v5
with Python version'3.12.x'
aligns with the latest improvements and ensures compatibility.
75-81
: Poetry Installation Step is Appropriately ConfiguredThe action
snok/[email protected]
with virtualenv settings is a good choice to manage the Python environment consistently.
82-85
: Poetry Dependency Installation is ProperExecuting
poetry install --no-interaction --all-extras
helps create a reproducible environment with all required extras.
92-104
: Ollama Readiness Check in Test Job is RobustThe retry mechanism in this job mirrors the earlier implementation and reliably confirms that the Ollama service is up before executing tests.
111-125
: Verify Consistency of Environment Variables and SecretsThe environment variables set for the test (mixing hardcoded values and secrets like
OPENAI_API_KEY
andGRAPHISTRY_USERNAME
) should be verified against the expectations of the reusable workflow (./.github/workflows/reusable_python_example.yml
). Confirm whether these variables are required or if adjustments/removals are needed for consistency.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 125-125: no new line character at the end of file
(new-line-at-end-of-file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
.github/workflows/test_ollama.yml (4)
52-56
: Enhance Error Handling in the Pull Models Step.
The curl commands pull the required models but do not explicitly enforce failure on error. Consider adding aset -e
at the beginning of the run block so the step fails immediately if one of the curl commands fails.- run: | - curl -X POST http://localhost:11434/api/pull -d '{"name": "ollama/llama3.2"}' - curl -X POST http://localhost:11434/api/pull -d '{"name": "avr/sfr-embedding-mistral:latest"}' + run: | + set -e + curl -X POST http://localhost:11434/api/pull -d '{"name": "ollama/llama3.2"}' + curl -X POST http://localhost:11434/api/pull -d '{"name": "avr/sfr-embedding-mistral:latest"}'
86-90
: Consider Consolidating Dependency Installation Steps.
There are two consecutive dependency installation steps (one using a general install and another installing specific packages). Consolidating these steps could simplify the workflow and reduce potential redundancy.
91-103
: Repeated Polling Logic Could Be DRYed Up.
The "Wait for Ollama to be ready" step repeats the same polling logic as in thesetup-ollama
job. If this logic is used elsewhere, consider abstracting it into a reusable action or script to adhere to DRY principles.
125-125
: Add a Newline at End of File.
YAML best practices require a trailing newline at the end of the file. Please add a newline after line 125.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 125-125: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test_ollama.yml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/test_ollama.yml
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.35.1)
.github/workflows/test_ollama.yml
[error] 125-125: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (28)
- GitHub Check: run_simple_example_test
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: run_notebook_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_simple_example_test / test
- GitHub Check: run_dynamic_steps_example_test / test
- GitHub Check: run_multimedia_example_test / test
- GitHub Check: run_eval_framework_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: windows-latest
- GitHub Check: test
- GitHub Check: test
- GitHub Check: run_notebook_test / test
- GitHub Check: test
- GitHub Check: run_networkx_metrics_test / test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: Build Cognee Backend Docker App Image
🔇 Additional comments (14)
.github/workflows/test_ollama.yml (14)
1-7
: Workflow Metadata and Trigger Configuration are Clear.
The workflow name and the trigger events (manual dispatch and pull_request with specified types) are well defined and clear.
9-16
: Ollama Service Container Configuration Looks Good.
The service container definition for Ollama (with the specified image and port mapping) is correctly configured.
17-20
: Repository Checkout Step is Correct.
The checkout step uses a stable version of the checkout action and is appropriately placed.
21-24
: Upgrade Python Setup Action for Consistency.
In this step the workflow usesactions/setup-python@v4
, while the subsequent job uses version v5. For consistency and improved compatibility, consider updating this step to useactions/setup-python@v5
.- uses: actions/setup-python@v4 + uses: actions/setup-python@v5🧰 Tools
🪛 actionlint (1.7.4)
22-22: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
26-32
: Cache Pip Packages Step is Well Configured.
The caching configuration uses a hash of the requirements file to create a robust cache key.
34-38
: Dependency Installation in setup-ollama is Straightforward.
The step correctly upgrades pip and installs the required packages (ollama-python
andrequests
).
39-50
: Polling Loop for Ollama Readiness Works as Intended.
The loop correctly retries up to 30 times with a 2-second interval and exits appropriately when Ollama is ready or fails to start.
57-65
: run_simple_example_test Job Definition is Consistent.
The job dependencies, service configuration, and runner settings are properly defined and consistent with the previous job.
67-69
: Repository Checkout in run_simple_example_test is Correct.
The checkout step is correctly reused in this job.
70-74
: Python Setup in run_simple_example_test is Updated.
This step correctly usesactions/setup-python@v5
and specifies a recent Python version (3.12.x
).
75-81
: Poetry Installation is Properly Configured.
The step installing Poetry with the specified options is adequate and enables in-project virtual environments with parallel installers.
82-85
: Initial Poetry Dependency Installation is Correct.
Runningpoetry install --no-interaction --all-extras
efficiently installs all dependencies defined in the project.
104-108
: Docker Logs Dumping Step is Useful for Debugging.
This step runs commands to list running containers and dump the logs for the Ollama container, which is helpful for troubleshooting.
110-124
: Run Example Test Step - Verify Environment Variable Consistency.
The environment variables provided for the test (such asLLM_API_KEY
,LLM_PROVIDER
, etc.) appear to be correctly set. Please ensure these values (and the hardcoded ones, like"ollama"
) match your repository’s secret definitions and expected test configurations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (2)
.github/workflows/test_ollama.yml (2)
55-96
: Reduce duplication by using a reusable workflow.The setup steps (Python, Poetry, Ollama readiness check) are duplicated from the
setup-ollama
job. Consider extracting these common steps into a reusable workflow.
109-117
: Make environment variables configurable.The environment variables for LLM and embedding configurations are hardcoded. Consider making them configurable through workflow inputs or repository secrets for better flexibility.
env: LLM_API_KEY: "ollama" - LLM_PROVIDER: "ollama" - LLM_ENDPOINT: "http://127.0.0.1:11434" - LLM_MODEL: "ollama/llama3.2" - EMBEDDING_PROVIDER: "ollama" - EMBEDDING_MODEL: "avr/sfr-embedding-mistral:latest" - EMBEDDING_ENDPOINT: "http://localhost:11434/api/embeddings" - EMBEDDING_DIMENSIONS: "4096" - HUGGINGFACE_TOKENIZER: "Salesforce/SFR-Embedding-Mistral" + LLM_PROVIDER: ${{ inputs.llm_provider || 'ollama' }} + LLM_ENDPOINT: ${{ inputs.llm_endpoint || 'http://127.0.0.1:11434' }} + LLM_MODEL: ${{ inputs.llm_model || 'ollama/llama3.2' }} + EMBEDDING_PROVIDER: ${{ inputs.embedding_provider || 'ollama' }} + EMBEDDING_MODEL: ${{ inputs.embedding_model || 'avr/sfr-embedding-mistral:latest' }} + EMBEDDING_ENDPOINT: ${{ inputs.embedding_endpoint || 'http://localhost:11434/api/embeddings' }} + EMBEDDING_DIMENSIONS: ${{ inputs.embedding_dimensions || '4096' }} + HUGGINGFACE_TOKENIZER: ${{ inputs.huggingface_tokenizer || 'Salesforce/SFR-Embedding-Mistral' }}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/test_ollama.yml
(1 hunks)cognee/infrastructure/llm/ollama/adapter.py
(2 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
cognee/infrastructure/llm/ollama/adapter.py
19-19: Redefinition of unused api_version
from line 1
(F811)
🪛 GitHub Actions: lint | ruff lint
cognee/infrastructure/llm/ollama/adapter.py
[error] 19-19: Ruff: Redefinition of unused api_version
from line 1. Remove definition: api_version
.
🪛 GitHub Actions: lint | ruff format
cognee/infrastructure/llm/ollama/adapter.py
[error] 1-1: Ruff formatting check failed. The file would be reformatted.
🪛 YAMLlint (1.35.1)
.github/workflows/test_ollama.yml
[error] 118-118: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (29)
- GitHub Check: windows-latest
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: run_networkx_metrics_test / test
- GitHub Check: run_eval_framework_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on macos-15
- GitHub Check: run_simple_example_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_multimedia_example_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_dynamic_steps_example_test / test
- GitHub Check: Test on macos-13
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: test
- GitHub Check: Test on macos-13
- GitHub Check: test
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Build Cognee Backend Docker App Image
- GitHub Check: docker-compose-test
- GitHub Check: setup-ollama
🔇 Additional comments (3)
cognee/infrastructure/llm/ollama/adapter.py (1)
75-103
: LGTM!The implementation correctly handles image encoding and follows the OpenAI API format for image analysis.
.github/workflows/test_ollama.yml (2)
118-118
: Add newline at end of file.Add a newline character at the end of the file to comply with YAML formatting standards.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 118-118: no new line character at the end of file
(new-line-at-end-of-file)
52-53
:❓ Verification inconclusive
Verify Ollama model names.
The model names used in the Pull Models step might be incorrect:
llama3.2
doesn't seem to be a standard Ollama model name- The embedding model uses a non-standard prefix
avr/
🏁 Script executed:
#!/bin/bash # Description: Check if the models exist in Ollama's model library curl -s https://ollama.ai/library | grep -E "llama3.2|avr/sfr-embedding-mistral"Length of output: 82
Manual Verification Required: Confirm Ollama Model Names
The current Pull Models step uses the following model names:
"llama3.2"
may not be a standard Ollama model name.- The embedding model
"avr/sfr-embedding-mistral:latest"
uses an unusual prefix.The verification script produced no output, so it's inconclusive whether these names exist in Ollama's model library. Please manually verify these model names against Ollama's official library or documentation and update the workflow if necessary.
@@ -1,20 +1,28 @@ | |||
from sys import api_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused import.
The api_version
import from sys
is not used and conflicts with the class attribute. Remove this import to fix the redefinition error.
-from sys import api_version
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
from sys import api_version |
🧰 Tools
🪛 GitHub Actions: lint | ruff format
[error] 1-1: Ruff formatting check failed. The file would be reformatted.
def create_transcript(self, input): | ||
"""Generate a audio transcript from a user query.""" | ||
|
||
if not os.path.isfile(input): | ||
raise FileNotFoundError(f"The file {input} does not exist.") | ||
|
||
# with open(input, 'rb') as audio_file: | ||
# audio_data = audio_file.read() | ||
|
||
transcription = self.aclient.transcription( | ||
model=self.transcription_model, | ||
file=Path(input), | ||
api_key=self.api_key, | ||
api_base=self.endpoint, | ||
api_version=self.api_version, | ||
max_retries=self.MAX_RETRIES, | ||
) | ||
|
||
return transcription |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix implementation issues in create_transcript
.
- The
transcription_model
attribute is not defined in the class. - There is commented-out code that should be removed or implemented.
Apply this diff to fix the issues:
def create_transcript(self, input):
"""Generate a audio transcript from a user query."""
if not os.path.isfile(input):
raise FileNotFoundError(f"The file {input} does not exist.")
- # with open(input, 'rb') as audio_file:
- # audio_data = audio_file.read()
-
transcription = self.aclient.transcription(
- model=self.transcription_model,
+ model=self.model, # Use the model defined in __init__
file=Path(input),
api_key=self.api_key,
api_base=self.endpoint,
api_version=self.api_version,
max_retries=self.MAX_RETRIES,
)
return transcription
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
def create_transcript(self, input): | |
"""Generate a audio transcript from a user query.""" | |
if not os.path.isfile(input): | |
raise FileNotFoundError(f"The file {input} does not exist.") | |
# with open(input, 'rb') as audio_file: | |
# audio_data = audio_file.read() | |
transcription = self.aclient.transcription( | |
model=self.transcription_model, | |
file=Path(input), | |
api_key=self.api_key, | |
api_base=self.endpoint, | |
api_version=self.api_version, | |
max_retries=self.MAX_RETRIES, | |
) | |
return transcription | |
def create_transcript(self, input): | |
"""Generate a audio transcript from a user query.""" | |
if not os.path.isfile(input): | |
raise FileNotFoundError(f"The file {input} does not exist.") | |
transcription = self.aclient.transcription( | |
model=self.model, # Use the model defined in __init__ | |
file=Path(input), | |
api_key=self.api_key, | |
api_base=self.endpoint, | |
api_version=self.api_version, | |
max_retries=self.MAX_RETRIES, | |
) | |
return transcription |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (4)
.github/workflows/test_ollama.yml (4)
39-40
: Ollama Installation:Installing Ollama via
curl
is straightforward; however, consider enhancing error handling. For instance, piping the installation script tobash -e
can ensure the process exits on failure.- run: curl -fsSL https://ollama.com/install.sh | sh + run: curl -fsSL https://ollama.com/install.sh | bash -e
41-45
: Running Ollama and Model Pulls:This step starts multiple background processes to serve Ollama and pull the required models. While running processes in the background is acceptable, consider monitoring their outputs or errors to catch any potential issues during startup.
50-61
: Wait for Service Readiness:The loop that checks for Ollama’s availability (retrying up to 30 times) is a sound approach. For additional robustness, consider beginning the script with error flags (e.g.,
set -e
orset -o pipefail
) to catch unexpected errors.
84-84
: File Formatting - Trailing Newline:A newline character is missing at the end of the file. Adding a trailing newline is recommended for compatibility with various tools and adherence to best practices.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 84-84: no new line character at the end of file
(new-line-at-end-of-file)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test_ollama.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/test_ollama.yml
[error] 84-84: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (29)
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: run_eval_framework_test / test
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: run_networkx_metrics_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: run_dynamic_steps_example_test / test
- GitHub Check: Test on macos-13
- GitHub Check: run_multimedia_example_test / test
- GitHub Check: run_simple_example_test / test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: test
- GitHub Check: test
- GitHub Check: windows-latest
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: docker-compose-test
- GitHub Check: Build Cognee Backend Docker App Image
- GitHub Check: run_simple_example_test
🔇 Additional comments (8)
.github/workflows/test_ollama.yml (8)
1-7
: Workflow Triggers Setup:The workflow is configured to trigger on both manual dispatch (
workflow_dispatch
) and pull request events (withlabeled
andsynchronize
types). Ensure these trigger types align with your intended CI/CD flow.
8-18
: Job Configuration and Service Container Setup:The job is set to run on
ubuntu-latest
and correctly defines a service container for "ollama" with the expected image and port mapping. No issues detected here.
20-22
: Repository Checkout:The repository is being checked out using
actions/checkout@v4
. This appears to be working well; however, you might consider reviewing if there’s any benefit in upgrading to a newer version in the future.
23-27
: Setup Python Environment:Using
actions/setup-python@v5
withpython-version: '3.12.x'
is a great choice. This step is clearly configured.
28-34
: Install Poetry Step:The Poetry installation step uses
snok/[email protected]
with flags to create an in-project virtual environment and enable parallel installation. This configuration is clear and efficient.
35-38
: Installing Dependencies:The command
poetry install --no-interaction --all-extras
ensures all dependencies (including optional extras) are installed without user input. This step is correctly set up.
63-67
: Dump Docker Logs:Dumping Docker logs is useful for debugging when the service fails to start correctly. The filtering using
docker ps
is a pragmatic solution. No further changes are needed.
69-84
: Run Example Test Configuration:The environment variables for the example test are comprehensively set, including references to secrets and provider-specific configurations. Verify that these values (and their corresponding secrets) match the expectations of your
simple_example.py
script and remain consistent with any reusable workflow configurations if applicable.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 84-84: no new line character at the end of file
(new-line-at-end-of-file)
- name: Call ollama API | ||
run: | | ||
curl -d '{"model": "llama3.2", "stream": false, "prompt":"Whatever I say, asnwer with Yes"}' http://localhost:11434/api/generate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API Call to Ollama:
The API call appears functionally correct. However, note the typo in the prompt ("asnwer" should be "answer"). Correcting this will ensure clarity in the test.
- curl -d '{"model": "llama3.2", "stream": false, "prompt":"Whatever I say, asnwer with Yes"}' http://localhost:11434/api/generate
+ curl -d '{"model": "llama3.2", "stream": false, "prompt":"Whatever I say, answer with Yes"}' http://localhost:11434/api/generate
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- name: Call ollama API | |
run: | | |
curl -d '{"model": "llama3.2", "stream": false, "prompt":"Whatever I say, asnwer with Yes"}' http://localhost:11434/api/generate | |
- name: Call ollama API | |
run: | | |
curl -d '{"model": "llama3.2", "stream": false, "prompt":"Whatever I say, answer with Yes"}' http://localhost:11434/api/generate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/test_ollama.yml (1)
46-48
:⚠️ Potential issueFix Prompt Typo in API Call
The API call's prompt contains a typo:"asnwer"
should be"answer"
. Correcting this typo will ensure clarity and proper behavior in the API response.- curl -d '{"model": "llama3.2", "stream": false, "prompt":"Whatever I say, asnwer with Yes"}' http://localhost:11434/api/generate + curl -d '{"model": "llama3.2", "stream": false, "prompt":"Whatever I say, answer with Yes"}' http://localhost:11434/api/generate
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test_ollama.yml
(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/test_ollama.yml
[error] 84-84: no new line character at the end of file
(new-line-at-end-of-file)
⏰ Context from checks skipped due to timeout of 90000ms (29)
- GitHub Check: run_eval_framework_test / test
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: run_dynamic_steps_example_test / test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: run_networkx_metrics_test / test
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on macos-15
- GitHub Check: Test on macos-13
- GitHub Check: run_notebook_test / test
- GitHub Check: test
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-13
- GitHub Check: run_multimedia_example_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on macos-13
- GitHub Check: test
- GitHub Check: run_simple_example_test / test
- GitHub Check: windows-latest
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: test
- GitHub Check: Build Cognee Backend Docker App Image
- GitHub Check: run_simple_example_test
- GitHub Check: docker-compose-test
🔇 Additional comments (7)
.github/workflows/test_ollama.yml (7)
1-7
: Approved: Workflow Trigger Configuration is Solid
The workflow triggers for both manual dispatch and pull_request events (with specific types) are correctly defined.
20-27
: Approved: Repository Checkout and Python Setup
The checkout and setup-python steps correctly ensure that the repository is available and the Python environment is set up with the desired version.
28-38
: Approved: Dependency Installation Steps
The steps for installing Poetry and the project dependencies (using Poetry with appropriate flags) are well formulated.
39-45
: Approved: Ollama Installation and Service Initialization
The installation of Ollama and the initiation of background processes to serve Ollama, as well as pulling the required models, are implemented correctly.
50-61
: Verified: Ollama Readiness Check Loop
The loop that checks for the Ollama API readiness is robust, using retries and appropriate exit conditions.
63-67
: Approved: Docker Logs Dump Step
The step to dump Docker logs is a practical addition for debugging in case the service fails to start.
69-84
: Approved: Example Test Execution Configuration
The environment variables and test execution command are set appropriately. Please ensure that all referenced secrets (e.g., OPENAI_API_KEY, GRAPHISTRY_USERNAME, GRAPHISTRY_PASSWORD) are configured in the repository settings and that they meet the test script requirements.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 84-84: no new line character at the end of file
(new-line-at-end-of-file)
EMBEDDING_ENDPOINT: "http://127.0.0.1:11434/api/embeddings" | ||
EMBEDDING_DIMENSIONS: "4096" | ||
HUGGINGFACE_TOKENIZER: "Salesforce/SFR-Embedding-Mistral" | ||
run: poetry run python ./examples/python/simple_example.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix File Formatting: Append a Newline at File End
YAML standards require a newline at the end of the file. Adding this will prevent linting issues and ensure compatibility with various tools.
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 84-84: no new line character at the end of file
(new-line-at-end-of-file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test_gemini.yml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/test_gemini.yml
22-22: secret "EMBEDDING_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
23-23: secret "EMBEDDING_API_KEY" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
24-24: secret "EMBEDDING_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
25-25: secret "EMBEDDING_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
26-26: secret "EMBEDDING_API_VERSION" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
27-27: secret "EMBEDDING_DIMENSIONS" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
28-28: secret "EMBEDDING_MAX_TOKENS" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
29-29: secret "LLM_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
31-31: secret "LLM_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
32-32: secret "LLM_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
33-33: secret "LLM_API_VERSION" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
⏰ Context from checks skipped due to timeout of 90000ms (21)
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: run_dynamic_steps_example_test / test
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on macos-13
- GitHub Check: run_eval_framework_test / test
- GitHub Check: Test on macos-15
- GitHub Check: run_notebook_test / test
- GitHub Check: Test on macos-13
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on macos-13
- GitHub Check: test
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: Test on ubuntu-22.04
- GitHub Check: test
- GitHub Check: test
- GitHub Check: windows-latest
- GitHub Check: run_simple_example_test
- GitHub Check: docker-compose-test
🔇 Additional comments (4)
.github/workflows/test_gemini.yml (4)
1-2
: Workflow Name DeclarationThe workflow name
test | gemini
is defined clearly and concisely.
3-7
: Trigger Configuration CheckThe workflow is configured to trigger on both manual dispatch (
workflow_dispatch
) and specific pull request events (labeled
andsynchronize
). This is appropriate for the intended testing scenarios.
9-12
: Concurrency Setup ReviewThe concurrency block is well-configured to group runs by workflow name and pull request number (or branch reference), ensuring that in-progress runs are canceled when a new one is triggered. This helps prevent overlapping executions.
13-17
: Job Definition and Reusable Workflow InvocationThe job
run_simple_example_test
correctly leverages a reusable workflow defined in./.github/workflows/reusable_python_example.yml
and passes the parameterexample-location
pointing to the intended Python example. Ensure that the reusable workflow file is maintained accordingly to accept this input.
secrets: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
GRAPHISTRY_USERNAME: ${{ secrets.GRAPHISTRY_USERNAME }} | ||
GRAPHISTRY_PASSWORD: ${{ secrets.GRAPHISTRY_PASSWORD }} | ||
EMBEDDING_PROVIDER: "gemini" | ||
EMBEDDING_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
EMBEDDING_MODEL: "gemini/text-embedding-004" | ||
EMBEDDING_ENDPOINT: "https://generativelanguage.googleapis.com/v1beta/models/text-embedding-004" | ||
EMBEDDING_API_VERSION: "v1beta" | ||
EMBEDDING_DIMENSIONS: 768 | ||
EMBEDDING_MAX_TOKENS: 8076 | ||
LLM_PROVIDER: "gemini" | ||
LLM_API_KEY: ${{ secrets.GEMINI_API_KEY }} | ||
LLM_MODEL: "gemini/gemini-1.5-flash" | ||
LLM_ENDPOINT: "https://generativelanguage.googleapis.com/" | ||
LLM_API_VERSION: "v1beta" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secrets Mismatch with Reusable Workflow
The job passes several secrets that are not defined in the reusable workflow (reusable_python_example.yml
). According to the static analysis hints, only OPENAI_API_KEY
, GRAPHISTRY_USERNAME
, GRAPHISTRY_PASSWORD
, and LLM_API_KEY
are expected, yet the configuration includes additional secrets such as:
EMBEDDING_PROVIDER
EMBEDDING_API_KEY
EMBEDDING_MODEL
EMBEDDING_ENDPOINT
EMBEDDING_API_VERSION
EMBEDDING_DIMENSIONS
EMBEDDING_MAX_TOKENS
LLM_PROVIDER
LLM_MODEL
LLM_ENDPOINT
LLM_API_VERSION
Please either update the reusable workflow file to accept these additional secrets (if they are necessary for the workflow’s operation) or remove them from here to avoid potential configuration issues.
🧰 Tools
🪛 actionlint (1.7.4)
22-22: secret "EMBEDDING_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
23-23: secret "EMBEDDING_API_KEY" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
24-24: secret "EMBEDDING_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
25-25: secret "EMBEDDING_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
26-26: secret "EMBEDDING_API_VERSION" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
27-27: secret "EMBEDDING_DIMENSIONS" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
28-28: secret "EMBEDDING_MAX_TOKENS" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
29-29: secret "LLM_PROVIDER" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
31-31: secret "LLM_MODEL" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
32-32: secret "LLM_ENDPOINT" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
33-33: secret "LLM_API_VERSION" is not defined in "./.github/workflows/reusable_python_example.yml" reusable workflow. defined secrets are "GRAPHISTRY_PASSWORD", "GRAPHISTRY_USERNAME", "LLM_API_KEY", "OPENAI_API_KEY"
(workflow-call)
Description
DCO Affirmation
I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin
Summary by CodeRabbit