Skip to content

Commit

Permalink
docs(README) : change config example
Browse files Browse the repository at this point in the history
  • Loading branch information
LordPax committed Oct 16, 2024
1 parent 5d983be commit 328f3fb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

## [Unreleased]

### Changed

* Fix config example in README.md

### Added

* Add sdk openai for image generation command
* Add image generation command

## [0.5.0]
## [0.5.0] - 2024-10-13

### Added

Expand Down
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,6 @@ Will generate a config file at `~/.config/aicli/config.ini`

## Config example

```ini
[text]
type=openai
model=gpt-4
apiKey=yoursecretapikey
temp=0.7

[translate]
type=deepl
apiKey=yoursecretapikey
```

With type as prefix, parameter will be specific for this type, if there is no prefix, parameter will be global

```ini
[text]
type=openai
Expand All @@ -77,6 +63,11 @@ temp=0.7
[translate]
type=deepl
apiKey=yoursecretapikey

[image]
type=openai
model=dall-e-3
apiKey=yoursecretapikey
```

## Integration with tmux
Expand Down
13 changes: 10 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,20 @@ var (
CONFIG_EXEMPLE = `
[text]
type=openai
model=gpt-4
apiKey=yoursecretapikey
openai-model=gpt-4
openai-apiKey=yoursecretapikey
claude-model=claude-3-5-sonnet-20240620
claude-apiKey=yoursecretapikey
temp=0.7
[translate]
type=deepl
apiKey=yoursecretapikey`
apiKey=yoursecretapikey
[image]
type=openai
model=dall-e-3
`
)

func InitConfig() error {
Expand Down

0 comments on commit 328f3fb

Please sign in to comment.