Skip to content

Commit

Permalink
fix update provider settings error
Browse files Browse the repository at this point in the history
  • Loading branch information
spikelu2016 committed Jun 12, 2024
1 parent c197e98 commit 2ebba36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,16 @@ docker pull luyuanxin1995/bricksllm:1.4.0
> | `POSTGRESQL_DB_NAME` | optional | Name for Postgresql DB. |
> | `POSTGRESQL_USERNAME` | required | Postgresql DB username |
> | `POSTGRESQL_PASSWORD` | required | Postgresql DB password |
> | `POSTGRESQL_SSL_MODE` | optional | Postgresql SSL mode| `disable`
> | `POSTGRESQL_PORT` | optional | The port that Postgresql DB runs on| `5432`
> | `POSTGRESQL_READ_TIME_OUT` | optional | Timeout for Postgresql read operations | `2m`
> | `POSTGRESQL_WRITE_TIME_OUT` | optional | Timeout for Postgresql write operations | `5s`
> | `REDIS_HOSTS` | required | Host for Redis. Separated by , | `localhost`
> | `POSTGRESQL_SSL_MODE` | optional | Postgresql SSL mode| `disable` |
> | `POSTGRESQL_PORT` | optional | The port that Postgresql DB runs on| `5432` |
> | `POSTGRESQL_READ_TIME_OUT` | optional | Timeout for Postgresql read operations | `2m` |
> | `POSTGRESQL_WRITE_TIME_OUT` | optional | Timeout for Postgresql write operations | `5s` |
> | `REDIS_HOSTS` | required | Host for Redis. Separated by , | `localhost` |
> | `REDIS_PASSWORD` | optional | Redis Password |
> | `REDIS_PORT` | optional | The port that Redis DB runs on | `6379`
> | `REDIS_READ_TIME_OUT` | optional | Timeout for Redis read operations | `1s`
> | `REDIS_WRITE_TIME_OUT` | optional | Timeout for Redis write operations | `500ms`
> | `IN_MEMORY_DB_UPDATE_INTERVAL` | optional | The interval BricksLLM API gateway polls Postgresql DB for latest key configurations | `1s`
> | `REDIS_PORT` | optional | The port that Redis DB runs on | `6379` |
> | `REDIS_READ_TIME_OUT` | optional | Timeout for Redis read operations | `1s` |
> | `REDIS_WRITE_TIME_OUT` | optional | Timeout for Redis write operations | `500ms` |
> | `IN_MEMORY_DB_UPDATE_INTERVAL` | optional | The interval BricksLLM API gateway polls Postgresql DB for latest key configurations | `1s` |
> | `STATS_PROVIDER` | optional | This value can only be datadog. Required for integration with Datadog. |
> | `PROXY_TIMEOUT` | optional | Timeout for proxy HTTP requests. | `600s` |
> | `NUMBER_OF_EVENT_MESSAGE_CONSUMERS` | optional | Number of event message consumers that help handle counting tokens and inserting event into db. | `3` |
Expand All @@ -159,8 +159,7 @@ docker pull luyuanxin1995/bricksllm:1.4.0
> | `AMAZON_REGION` | optional | Region for AWS. | `us-west-2` |
> | `AMAZON_REQUEST_TIMEOUT` | optional | Timeout for amazon requests. | `5s` |
> | `AMAZON_CONNECTION_TIMEOUT` | optional | Timeout for amazon connection. | `10s` |
> | `AWS_SECRET_ACCESS_KEY` | optional | Required for PII detection features. |
> | `AWS_ACCESS_KEY_ID` | optional | Required for PII detection features. |
> | `ADMIN_PASS` | optional | Simple password for the admin server. |
## Configuration Endpoints
The configuration server runs on Port `8001`.
Expand Down
1 change: 1 addition & 0 deletions internal/storage/postgresql/provider_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func (s *Store) UpdateProviderSetting(id string, setting *provider.UpdateSetting
if setting.AllowedModels != nil {
values = append(values, sliceToSqlStringArray(*setting.AllowedModels))
fields = append(fields, fmt.Sprintf("allowed_models = $%d", d))
d++
}

if setting.CostMap != nil {
Expand Down

0 comments on commit 2ebba36

Please sign in to comment.