Skip to content
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

Open
wants to merge 26 commits into
base: dev
Choose a base branch
from
Open

feat: Draft ollama test #566

wants to merge 26 commits into from

Conversation

Vasilije1990
Copy link
Contributor

@Vasilije1990 Vasilije1990 commented Feb 19, 2025

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

  • Tests
    • Introduced a new automated testing workflow for Ollama and Gemini that runs on pull requests and manual triggers.
    • The Ollama workflow includes setting up the service and executing a simple example test to enhance continuous integration.
    • Enhanced dependency update workflow with new triggers for push and pull request events, and added an optional debug logging parameter.
    • Added new capabilities for audio transcription and image processing within the Ollama API adapter.

Copy link
Contributor

coderabbitai bot commented Feb 19, 2025

Walkthrough

A new GitHub Actions workflow file (test_ollama.yml) has been added. It is triggered by manual dispatch and pull request events and defines a single job that runs on an Ubuntu environment, sets up Python, installs dependencies, waits for the Ollama service to be ready, and pulls specific models via API requests. Additionally, modifications have been made to the upgrade_deps.yml workflow to enhance its triggers and introduce a debug input parameter. A new workflow file named test_gemini.yml has also been introduced, which runs a Python example with specific secrets and parameters.

Changes

File(s) Change Summary
.github/workflows/test_ollama.yml Added new workflow with a job that checks out the repo, sets up Python, installs dependencies, waits for the Ollama service (via local API polling), pulls specified models, and runs an example test script.
.github/workflows/upgrade_deps.yml Enhanced workflow triggers for push and pull_request events related to poetry.lock and pyproject.toml. Added input parameter debug_enabled for enabling debug logging in workflow_dispatch.
.github/workflows/test_gemini.yml Added new workflow that runs a Python example with specified secrets and parameters, triggered by manual dispatch and pull request events.
cognee/infrastructure/llm/ollama/adapter.py Updated OllamaAPIAdapter class:
- Added api_version parameter to constructor.
- Introduced create_transcript and transcribe_image methods for audio transcription and image processing.

Suggested reviewers

  • borisarzentar

Poem

I'm a little rabbit, hopping through the code,
Finding workflows in a brand new mode.
Ollama purrs, models leap into place,
As secrets and tests dance through the space.
With each line of change, my heart skips a beat—
A CodeRabbit celebration, lively and sweet! 🐇


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 Version

The 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 Spaces

There 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 Secrets

The 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 File

The 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

📥 Commits

Reviewing files that changed from the base of the PR and between 45f7c63 and 2de364b.

📒 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



run_simple_example_test:
uses: ./.github/workflows/reusable_python_example.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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)

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 issue

Fix YAML Indentation in run_simple_example_test Job

The reusable workflow job (run_simple_example_test) is mis-indented. The keys under this job (such as uses:, with:, and secrets:) 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 Version

The 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 Step

Line 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 File

There 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

📥 Commits

Reviewing files that changed from the base of the PR and between 2de364b and 8ebd9a7.

📒 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 Approved

The 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 Good

The configuration for caching pip packages is set up correctly to speed up subsequent runs.


36-45: Dependency Installation and Ollama Readiness Check are Correct

Both the dependency installation step and the loop waiting for the Ollama service to be ready are implemented properly.


46-49: Pull Model Step Verified

The step to pull the model via the API is clear and syntactically correct.

Comment on lines 59 to 70
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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)

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 uses actions/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 two curl 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, the run_simple_example_test job uses actions/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

📥 Commits

Reviewing files that changed from the base of the PR and between 8ebd9a7 and 9d0d96e.

📒 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

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 the run_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 the setup-ollama job (lines 39–50) and the run_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

📥 Commits

Reviewing files that changed from the base of the PR and between b4088be and 96adcfb.

📒 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.
The Run example test step sets several environment variables (such as LLM_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.

Comment on lines 21 to 24
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
Copy link
Contributor

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.

Suggested change
- 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)

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 suggestion

Update Setup Python Version in setup-ollama Job.
Please update actions/setup-python@v4 to actions/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

📥 Commits

Reviewing files that changed from the base of the PR and between 96adcfb and edd681f.

📒 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.
The Run 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 suggestion

Consider Updating the Python Setup Action Version

The setup-ollama job is still using actions/setup-python@v4, whereas the run_simple_example_test job uses actions/setup-python@v5. For consistency and improved compatibility, update this step to use 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 (3)
.github/workflows/test_ollama.yml (3)

52-56: Consider Adding Error Handling in the Pull Models Step

While 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 Detected

There 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, and transformers) are required only for this job, ensure they are declared in the project’s dependency files or use poetry add for clarity.


105-109: Docker Logs Dump Step is Useful for Diagnostics

Dumping 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

📥 Commits

Reviewing files that changed from the base of the PR and between edd681f and 02b0109.

📒 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 Good

The 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 Correct

The setup-ollama job efficiently uses a service container with the ollama/ollama image and correctly maps port 11434.


17-20: Repository Checkout Step is Standard

The 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 Solid

The 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 Clear

The commands upgrade pip and install ollama-python and requests as needed. Ensure these are the only dependencies required for the initial environment setup.


39-51: Ollama Readiness Check is Well-Implemented

The 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: Job run_simple_example_test Configuration is Well-Defined

The 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 Consistent

The 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 Use

Using 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 Configured

The action snok/[email protected] with virtualenv settings is a good choice to manage the Python environment consistently.


82-85: Poetry Dependency Installation is Proper

Executing poetry install --no-interaction --all-extras helps create a reproducible environment with all required extras.


92-104: Ollama Readiness Check in Test Job is Robust

The 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 Secrets

The environment variables set for the test (mixing hardcoded values and secrets like OPENAI_API_KEY and GRAPHISTRY_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)

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 a set -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 the setup-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

📥 Commits

Reviewing files that changed from the base of the PR and between 02b0109 and a91e83e.

📒 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 uses actions/setup-python@v4, while the subsequent job uses version v5. For consistency and improved compatibility, consider updating this step to use actions/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 and requests).


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 uses actions/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.
Running poetry 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 as LLM_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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between a91e83e and 90d96aa.

📒 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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.

Suggested change
from sys import api_version
🧰 Tools
🪛 GitHub Actions: lint | ruff format

[error] 1-1: Ruff formatting check failed. The file would be reformatted.

Comment on lines +55 to +73
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix implementation issues in create_transcript.

  1. The transcription_model attribute is not defined in the class.
  2. 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.

Suggested change
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

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 to bash -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 or set -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

📥 Commits

Reviewing files that changed from the base of the PR and between 90d96aa and 4c4723b.

📒 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 (with labeled and synchronize 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 with python-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)

Comment on lines +46 to +48
- name: Call ollama API
run: |
curl -d '{"model": "llama3.2", "stream": false, "prompt":"Whatever I say, asnwer with Yes"}' http://localhost:11434/api/generate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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.

Suggested change
- 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

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 issue

Fix 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4c4723b and 846c45e.

📒 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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)

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 846c45e and 2c0bfc8.

📒 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 Declaration

The workflow name test | gemini is defined clearly and concisely.


3-7: Trigger Configuration Check

The workflow is configured to trigger on both manual dispatch (workflow_dispatch) and specific pull request events (labeled and synchronize). This is appropriate for the intended testing scenarios.


9-12: Concurrency Setup Review

The 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 Invocation

The job run_simple_example_test correctly leverages a reusable workflow defined in ./.github/workflows/reusable_python_example.yml and passes the parameter example-location pointing to the intended Python example. Ensure that the reusable workflow file is maintained accordingly to accept this input.

Comment on lines +18 to +33
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant