mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 18:51:59 +00:00
This PR has a single goal: pass a new `ModelConfigInfo` type, which has the `Provider` and `Model` we should use to serve a completions request, down into `client.Get()` This PR explicitly only handles the case we care about for Self-hosted models, and all pieces of logic that I expect will be replaced/superseded by your work @chrsmith are annotated with `// TODO(slimsag): self-hosted-models:` comments so we can easily find and remove them when your work is ready. Every location I have modified has been carefully wrapped in an if statement like `if conf.Get().SiteConfig().ModelConfiguration != nil` to ensure that this change _only_ affects people who set the new `"modelConfiguration"` site config property. ## Test plan 1. Configured `"modelConfiguration"` and removed `"completions"` in my dev instances' site config. 2. Used VS Code chat to confirm I see this codepath is connected end-to-end and I get a `TODO` error back: <img width="679" alt="image" src="https://github.com/sourcegraph/sourcegraph/assets/3173176/d3c07ffe-7ec2-4ad9-9251-2272ce36d44b"> ## Changelog N/A --------- Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com> |
||
|---|---|---|
| .. | ||
| auth | ||
| backend | ||
| dotcomproductsubscriptiontest | ||
| enterprise | ||
| envvar | ||
| external | ||
| globals | ||
| graphqlbackend | ||
| hubspot | ||
| internal | ||
| oneclickexport | ||
| registry | ||
| shared | ||
| webhooks | ||
| BUILD.bazel | ||
| image_test.yaml | ||
| main.go | ||
| README.md | ||
frontend
The frontend serves our web application and hosts our GraphQL API.
Typically there are multiple replicas running in production to scale with load.
Application data is stored in our PostgreSQL database.
Session data is stored in the Redis store, and non-persistent data is stored in the Redis cache.