Skip to content

Commit

Permalink
Best version yet
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Jun 27, 2024
1 parent 2ab1a3e commit 57480d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ func (a App) String() string {
return string(bytes)
}

func (app *App) ReportOn(loc, address, ft, value string) {
path := filepath.Join("./output/", app.Series.Suffix, strings.ToLower(loc))
func ReportOn(loc, address, ft, value string) {
path := filepath.Join("./output/", strings.ToLower(loc))
file.EstablishFolder(path)
file.StringToAsciiFile(filepath.Join(path, address+"."+ft), value)
}
Expand Down
10 changes: 5 additions & 5 deletions backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ func (app *App) GetImage(addr string) error {
return err
} else {
suff := app.Series.Suffix
app.ReportOn(filepath.Join(suff, "selector"), dd.Orig, "json", dd.String())
ReportOn(filepath.Join(suff, "selector"), dd.Orig, "json", dd.String())
data := app.GetData(addr)
app.ReportOn(filepath.Join(suff, "data"), dd.Orig, "txt", data)
ReportOn(filepath.Join(suff, "data"), dd.Orig, "txt", data)
terse := app.GetTerse(addr)
app.ReportOn(filepath.Join(suff, "terse"), dd.Orig, "txt", terse)
ReportOn(filepath.Join(suff, "terse"), dd.Orig, "txt", terse)
prompt := app.GetPrompt(addr)
app.ReportOn(filepath.Join(suff, "prompt"), dd.Orig, "txt", prompt)
ReportOn(filepath.Join(suff, "prompt"), dd.Orig, "txt", prompt)
enhanced := app.GetEnhanced(addr)
app.ReportOn(filepath.Join(suff, "enhanced"), dd.Orig, "txt", strings.ReplaceAll(enhanced, ".", ".\n"))
ReportOn(filepath.Join(suff, "enhanced"), dd.Orig, "txt", strings.ReplaceAll(enhanced, ".", ".\n"))
imageData := openai.ImageData{
TersePrompt: terse,
EnhancedPrompt: enhanced,
Expand Down
2 changes: 1 addition & 1 deletion pkg/openai/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func EnhancePrompt(prompt, authorType string) (string, error) {
url := "https://api.openai.com/v1/chat/completions"
payload := dalleRequest{
Model: "gpt-3.5-turbo",
Model: "gpt-4",
Seed: 1337,
Tempature: 0.2,
}
Expand Down

0 comments on commit 57480d4

Please sign in to comment.