Skip to content

Commit

Permalink
📝 README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
이용홍 committed Mar 9, 2023
1 parent 9c438ab commit 9e7f07f
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies {
- [Images](https://platform.openai.com/docs/api-reference/images)
- [Moderations](https://platform.openai.com/docs/api-reference/moderations)

## to use
## To use
```java
// java
final OpenAiService openAiService = new OpenAiService(apiKey);
Expand All @@ -54,15 +54,22 @@ val openAiService = OpenAiService(apiKey)
val listModels: ListModels = openAiService.listModels()
```

## application.yml
## Spring boot configuration
### @EnableOpenAi
```java
@EnableOpenAi
public class SpringBootApp {
}
```

### application.yml
```yaml
openai:
enabled: true
api-key: your api key
root-uri: https://api.openai.com
timeout: 30s
validate: false
logging:
root-uri: https://api.openai.com # optional
timeout: 30s # optional
validate: false # optional
logging: # optional
enable: true
level: BASIC
```
Expand Down

0 comments on commit 9e7f07f

Please sign in to comment.