Skip to content

Commit

Permalink
build: tryin ollama action
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Nov 7, 2024
1 parent 884868e commit c935e21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,29 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Run ollama server
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: uv run mknodes build

- name: Install uv
uses: yezz123/setup-uv@v4

- name: Install dependencies
run: |
uv sync --all-extras
- name: Build
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
run: uv run mknodes build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions src/jinjarope/resources/llm_filters.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ required_packages = ["litellm"]

[filters.llm_complete.examples.basic]
template = """
{{ "Describe how to install a package from PyPi" | llm_complete(model="gemini/gemini-1.5-flash") }}
{{ "Describe how to install a package from PyPi" | llm_complete(model="ollama/smollm2") }}
"""

[filters.llm_complete.examples.with_system_prompt]
template = """
{{ "What are the benefits of Python?" | llm_complete(model="gemini/gemini-1.5-flash", system_prompt="You are a helpful programming assistant.") }}
{{ "What are the benefits of Python?" | llm_complete(model="ollama/smollm2", system_prompt="You are a helpful programming assistant.") }}
"""

[filters.llm_complete.examples.with_context]
template = """
{{ "Explain its importance." | llm_complete(model="gemini/gemini-1.5-flash", context="We were discussing Python's role in data science.") }}
{{ "Explain its importance." | llm_complete(model="ollama/smollm2", context="We were discussing Python's role in data science.") }}
"""

[filters.llm_generate_image]
Expand Down

0 comments on commit c935e21

Please sign in to comment.