Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

[Backport 5.2] Add Cody providers to pings#58937

Merged
jdpleiness merged 2 commits into
5.2from
backport-58848-to-5.2
Dec 13, 2023
Merged

[Backport 5.2] Add Cody providers to pings#58937
jdpleiness merged 2 commits into
5.2from
backport-58848-to-5.2

Conversation

@sourcegraph-release-bot

@sourcegraph-release-bot sourcegraph-release-bot commented Dec 12, 2023

Copy link
Copy Markdown
Collaborator

Adds Cody completions and embeddings providers data to pings.
Provider name is always included. Model name is included only for "sourcegraph" provider.

Closes https://github.com/sourcegraph/sourcegraph/issues/58826

BigQuery pings schema update

Site config Value in pings Note
{ "cody.enabled": false } "codyProviders": { "Embeddings": null, "Completions": null } If Cody is disabled, completions and embeddings are not used. Return empty values similar to GetCompletionsConfig and GetEmbeddingsConfig
{ "cody.enabled": true, "completions": { "chatModel": "claude-v1", "completionModel": "claude-instant-v1", "fastChatModel": "claude-instant-1" "provider": "anthropic", "accessToken": "REDACTED" } } "codyProviders": { "Embeddings": { "Model": "openai/text-embedding-ada-002", "Provider": "sourcegraph" }, "Completions": { "Provider": "anthropic", "ChatModel": "", "CompletionModel": "", "FastChatModel": "" } } Cody is enabled, completions config is defined, embeddings - is not. Return only provider name for completions provider (don't return model names as the provider is not "sourcegraph"). Return default embeddings provider.
{ "cody.enabled": true, "embeddings": { "provider": "sourcegraph", "accessToken": "REDACTED" } } "codyProviders": { "Embeddings": { "Model": "openai/text-embedding-ada-002", "Provider": "sourcegraph" }, "Completions": { "Provider": "sourcegraph", "ChatModel": "anthropic/claude-2.0", "CompletionModel": "anthropic/claude-instant-1", "FastChatModel": "anthropic/claude-instant-1" } } Cody is enabled, embeddings config is defined, completions - is not. Return the provider and model name for the completions provider (note, the model name is not provided in the site config - the default one is used). Return default completions provider (with model names as the provider is "sourcegraph").

Test plan

  • CI passes
  • Tested manually: most recent ping contains correct Cody providers data (see values in the table above)

Preview 🤩

Preview Link
Backport 2ffd9d6 from #58848

Preview 🤩

Preview Link

@sourcegraph-bot

sourcegraph-bot commented Dec 12, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 021f43a...aeca8f8.

Notify File(s)
@sourcegraph/delivery doc/admin/pings.md
@unknwon internal/updatecheck/client.go
internal/updatecheck/handler.go
internal/updatecheck/handler_test.go

@sourcegraph-bot

sourcegraph-bot commented Dec 12, 2023

Copy link
Copy Markdown
Contributor

📖 Storybook live preview

@jdpleiness jdpleiness merged commit da5f914 into 5.2 Dec 13, 2023
@jdpleiness jdpleiness deleted the backport-58848-to-5.2 branch December 13, 2023 16:25
@varungandhi-src varungandhi-src mentioned this pull request Jan 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants