-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from edgararuiz/updates
Adds Ollama tests
- Loading branch information
Showing
28 changed files
with
498 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: main | ||
|
||
name: R-CMD-check.yaml | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
R-CMD-check: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- {os: macos-latest, r: 'release'} | ||
- {os: windows-latest, r: 'release'} | ||
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} | ||
- {os: ubuntu-latest, r: 'release'} | ||
- {os: ubuntu-latest, r: 'oldrel-1'} | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
http-user-agent: ${{ matrix.config.http-user-agent }} | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::rcmdcheck | ||
needs: check | ||
|
||
- uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
upload-snapshots: true | ||
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Classify on Ollama works | ||
|
||
Code | ||
llm_classify(reviews, review, labels = c("appliance", "computer")) | ||
Output | ||
review | ||
1 This has been the best TV I've ever used. Great screen, and sound. | ||
2 I regret buying this laptop. It is too slow and the keyboard is too noisy | ||
3 Not sure how to feel about my new washing machine. Great color, but hard to figure | ||
.classify | ||
1 appliance | ||
2 computer | ||
3 appliance | ||
|
||
--- | ||
|
||
Code | ||
llm_classify(reviews, review, pred_name = "new", labels = c("appliance", | ||
"computer")) | ||
Output | ||
review | ||
1 This has been the best TV I've ever used. Great screen, and sound. | ||
2 I regret buying this laptop. It is too slow and the keyboard is too noisy | ||
3 Not sure how to feel about my new washing machine. Great color, but hard to figure | ||
new | ||
1 appliance | ||
2 computer | ||
3 appliance | ||
|
||
--- | ||
|
||
Code | ||
llm_classify(reviews, review, pred_name = "new", labels = c("appliance", | ||
"computer"), additional_prompt = "Consider all laptops as appliances.") | ||
Output | ||
review | ||
1 This has been the best TV I've ever used. Great screen, and sound. | ||
2 I regret buying this laptop. It is too slow and the keyboard is too noisy | ||
3 Not sure how to feel about my new washing machine. Great color, but hard to figure | ||
new | ||
1 appliance | ||
2 appliance | ||
3 appliance | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Custom on Ollama works | ||
|
||
Code | ||
llm_custom(reviews_table(), review, my_prompt) | ||
Output | ||
review | ||
1 This has been the best TV I've ever used. Great screen, and sound. | ||
2 I regret buying this laptop. It is too slow and the keyboard is too noisy | ||
3 Not sure how to feel about my new washing machine. Great color, but hard to figure | ||
.pred | ||
1 Yes | ||
2 No | ||
3 No | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Extract on Ollama works | ||
|
||
Code | ||
llm_extract(reviews_table(), review, "product") | ||
Output | ||
review | ||
1 This has been the best TV I've ever used. Great screen, and sound. | ||
2 I regret buying this laptop. It is too slow and the keyboard is too noisy | ||
3 Not sure how to feel about my new washing machine. Great color, but hard to figure | ||
.extract | ||
1 tv | ||
2 laptop | ||
3 washing machine | ||
|
Oops, something went wrong.