-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
29 changed files
with
2,240 additions
and
0 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,28 @@ | ||
# This workflow will build a golang project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | ||
|
||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "*" ] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... |
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,7 @@ | ||
# OllamaTea .gitignore | ||
|
||
.task | ||
.DS_Store | ||
bin/ | ||
|
||
./hello.png |
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,87 @@ | ||
# .goreleaser.yml file | ||
# Copyright (c) 2024 Neomantra Corp | ||
# Documentation at http://goreleaser.com | ||
|
||
version: 2 | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- id: ot-ansi-to-png | ||
main: cmd/ot-ansi-to-png/main.go | ||
binary: bin/ot-ansi-to-png | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
- id: ot-png-prompt | ||
main: cmd/ot-png-prompt/main.go | ||
binary: bin/ot-png-prompt | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
- id: ot-simplegen | ||
main: cmd/ot-simplegen/main.go | ||
binary: bin/ot-simplegen | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
- id: ot-timechart | ||
main: cmd/ot-timechart/main.go | ||
binary: bin/ot-timechart | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
archives: | ||
- format: tar.gz | ||
# this name template makes the OS and Arch compatible with the results of `uname`. | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
# use zip for windows archives | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
|
||
release: | ||
github: | ||
owner: NimbleMarkets | ||
name: ollamatea | ||
|
||
brews: | ||
- homepage: https://github.com/NimbleMarkets/ollamatea | ||
description: "BubbleTea and Ollama components/tools" | ||
directory: Formula | ||
repository: | ||
owner: NimbleMarkets | ||
name: homebrew-tap | ||
branch: main | ||
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" | ||
commit_author: | ||
name: goreleaserbot | ||
email: [email protected] | ||
install: | | ||
bin.install "./bin/ot-ansi-to-png" | ||
bin.install "./bin/ot-png-prompt" | ||
bin.install "./bin/ot-simplegen" | ||
bin.install "./bin/ot-timechart" |
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,71 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "ot-ansi-to-png", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}/cmd/ot-ansi-to-png/main.go", | ||
"args": [ | ||
"--in", "${workspaceFolder}/tests/hello.txt", | ||
"--out", "${workspaceFolder}/tests/hello-debug.png" | ||
], | ||
"env": { | ||
"OLLAMATEA_MODEL": "llava", | ||
}, | ||
}, | ||
{ | ||
"name": "ot-png-prompt", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}/cmd/ot-png-prompt/main.go", | ||
"args": [ | ||
"--in", "${workspaceFolder}/tests/ollamatea-512.png", | ||
"--out", "${workspaceFolder}/tests/ollama-response-debug.txt" | ||
], | ||
"env": { | ||
"OLLAMATEA_MODEL": "llava", | ||
}, | ||
}, | ||
{ | ||
"name": "ot-timechart", | ||
"type": "go", | ||
"request": "launch", | ||
"mode": "auto", | ||
"program": "${workspaceFolder}/cmd/ot-timechart/main.go", | ||
"args": [ | ||
"--in", "${workspaceFolder}/tests/timechart.csv", | ||
], | ||
"env": { | ||
"OLLAMATEA_MODEL": "llava", | ||
}, | ||
}, | ||
{ | ||
"name": "Attach ot-simplegen", | ||
"type": "go", | ||
"debugAdapter": "dlv-dap", | ||
"request": "attach", | ||
"mode": "remote", | ||
"remotePath": "${workspaceFolder}/cmd/ot-simplegen", | ||
"port": 2345, | ||
"host": "127.0.0.1", | ||
"preLaunchTask": "Run ot-simplegen withheadless dlv" | ||
}, | ||
{ | ||
"name": "Attach ot-timechart", | ||
"type": "go", | ||
"debugAdapter": "dlv-dap", | ||
"request": "attach", | ||
"mode": "remote", | ||
"remotePath": "${workspaceFolder}/cmd/ot-timechart", | ||
"port": 2345, | ||
"host": "127.0.0.1", | ||
"preLaunchTask": "Run ot-timechart withheadless dlv" | ||
}, | ||
] | ||
} |
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,63 @@ | ||
// .vscode/tasks.json | ||
// Thank you @KevM | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Run ot-simplegen withheadless dlv", | ||
"type": "process", | ||
"command": [ | ||
"dlv", | ||
], | ||
"args": [ | ||
"debug", | ||
"--headless", | ||
"--listen=:2345", | ||
"--api-version=2", | ||
"${workspaceFolder}/cmd/ot-simplegen", | ||
], | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"owner": "go", | ||
"fileLocation": "relative", | ||
"pattern": { | ||
"regexp": "^couldn't start listener:", // error if matched | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": "^API server listening at:", | ||
"endsPattern": "^Got a connection, launched process" // success if matched | ||
} | ||
} | ||
}, | ||
{ | ||
"label": "Run ot-timechart withheadless dlv", | ||
"type": "process", | ||
"command": [ | ||
"dlv", | ||
], | ||
"args": [ | ||
"debug", | ||
"--headless", | ||
"--listen=:2345", | ||
"--api-version=2", | ||
"${workspaceFolder}/cmd/ot-timechart", | ||
"--", | ||
"--in", "${workspaceFolder}/tests/SPY.2024.1109.cut.csv.zstd" | ||
], | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"owner": "go", | ||
"fileLocation": "relative", | ||
"pattern": { | ||
"regexp": "^couldn't start listener:", // error if matched | ||
}, | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": "^API server listening at:", | ||
"endsPattern": "^Got a connection, launched process" // success if matched | ||
} | ||
} | ||
} | ||
] | ||
} |
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,5 @@ | ||
# OllamaTea CHANGELOG | ||
|
||
## 0.0.1 (2024-11-09) | ||
|
||
* Initial release |
Oops, something went wrong.