Skip to content

Commit

Permalink
V0.4.2 (#44)
Browse files Browse the repository at this point in the history
* rm tts debug

* version update

* update gha

* docker build

* go mod tidy

* rm play audio to test on arm processor

* rm play audio to test on arm processor

* clean dockerfile

* update goai

* Release v0.4.2
  • Loading branch information
seemywingz authored Dec 22, 2024
1 parent b1efe04 commit 3ace9dd
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ ponder image "a ferocious cat with wings and fire"
Ponder
GitHub: https://github.com/seemywingz/ponder
App Version: v0.4.1
App Version: v0.4.2
Ponder uses OpenAI's API to generate text responses to user input.
Or whatever else you can think of. 🤔
Expand Down
50 changes: 0 additions & 50 deletions cmd/http.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
package cmd

import (
"encoding/json"
"errors"
"fmt"
"io"
"log"
"net/http"
"os"
"path/filepath"
"strconv"
"strings"
"time"
)
Expand All @@ -19,52 +15,6 @@ var httpClient = &http.Client{
Timeout: time.Second * 60,
}

func httpMakeRequest(request *http.Request, responseJson interface{}) {

// Make the HTTP Request
resp, err := httpClient.Do(request)
catchErr(err)

// Read the JSON Response Body
jsonString, err := io.ReadAll(resp.Body)
catchErr(err)

// Check for HTTP Errors
httpCatchErr(resp, jsonString)
if verbose {
b, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatalln(err)
}
fmt.Println("🌐 HTTP Response", b)
}

// Unmarshal the JSON Response Body into provided responseJson
err = json.Unmarshal([]byte(jsonString), &responseJson)
catchErr(err)
if verbose {
trace()
fmt.Println("🌐 HTTP Response String", string(jsonString))
fmt.Println("🌐 HTTP Response JSON", responseJson)
}
// Close the HTTP Response Body
defer resp.Body.Close()
}

func httpCatchErr(resp *http.Response, jsonString []byte) {
// Check for HTTP Response Errors
if resp.StatusCode != 200 {
catchErr(errors.New("API Error: " + strconv.Itoa(resp.StatusCode) + "\n" + string(jsonString)))
}
}

// func httpDumpRequest(r *http.Request) {
// // Dump the HTTP Request
// dump, err := httputil.DumpRequest(r, true)
// catchErr(err)
// fmt.Println("🌐 HTTP Request", string(dump))
// }

// download file from url and save to local directory
func httpDownloadFile(url string, filePath string) string {
// Replace spaces with underscores
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

var ponderMessages = []goai.Message{}
var APP_VERSION = "v0.4.1"
var APP_VERSION = "v0.4.2"
var ai *goai.Client

var verbose,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/alecthomas/chroma v0.10.0
github.com/bwmarrin/discordgo v0.28.1
github.com/pterm/pterm v0.12.80
github.com/seemywingz/goai v0.0.0-20240428060229-cce9aefb4824
github.com/seemywingz/goai v0.1.0
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
)
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
github.com/seemywingz/goai v0.0.0-20240428060229-cce9aefb4824 h1:FZ9AyP936PADg5iW86XCXWqgHxjpxpd23BBS0b+194c=
github.com/seemywingz/goai v0.0.0-20240428060229-cce9aefb4824/go.mod h1:mxBUzpw6bdDPvYXX/zAAWqvCDCJOPFvTufwGisOWt+k=
github.com/seemywingz/goai v0.1.0 h1:nkAQpVjEZyTQQJWH+ScfFkdER5JxKFmVUKq/7TMwR/8=
github.com/seemywingz/goai v0.1.0/go.mod h1:mxBUzpw6bdDPvYXX/zAAWqvCDCJOPFvTufwGisOWt+k=
github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ=
github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
Expand Down
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: v0.4.1
version: v0.4.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.4.1"
appVersion: "v0.4.2"
2 changes: 1 addition & 1 deletion helm/values.production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replicaCount: 1
image:
repository: ghcr.io/seemywingz/ponder
pullPolicy: Always
tag: v0.4.1
tag: v0.4.2

imagePullSecrets: []
nameOverride: ""
Expand Down

0 comments on commit 3ace9dd

Please sign in to comment.