Code AI platform with Code Search & Cody
Go to file
Philipp Spiess 0ce98cd386
Claude 3 support and /messages API for Enterprise (#60953)
Closes #61166

This PR adds support for Claude 3 and the /messages API to the existing
anthropic provider in the Sourcegraph instance.

To ensure a smooth experience, there are a couple of edge cases that we
need to handle.

Because the URL is configurable, a customer could hard-set it to
/complete. We need to error properly in this case. Clients might not now
what is set so they can send requests in the "old" or "new" format. We
handle conversion as best as possible however for better instruction the
clients will eventually only send prompts in the /messages format. We
introduce cody API versioning for this case. Support /complete style
prompt (with trailing assistant, "holes" of no response, system prompt
in messages) when a legacy client connects

---------

Co-authored-by: Chris Warwick <christopher.warwick@sourcegraph.com>
2024-03-22 16:19:04 +01:00
.aspect feat/ci: when detecting changes affecting the generated docs, push them to docs repo as a PR (#61255) 2024-03-21 09:20:47 +00:00
.buildkite ci: do not fetch tags on steps that do not require it (#61156) 2024-03-14 17:02:10 +02:00
.github chore/gha: remove docsite previewing (#61289) 2024-03-20 10:05:04 +00:00
.vscode Remove App from codebase (#59115) 2023-12-21 01:07:05 +01:00
client Claude 3 support and /messages API for Enterprise (#60953) 2024-03-22 16:19:04 +01:00
cmd Claude 3 support and /messages API for Enterprise (#60953) 2024-03-22 16:19:04 +01:00
dev release: close 5.3.3 patch (#61337) 2024-03-22 13:56:49 +00:00
doc feat/ci: when detecting changes affecting the generated docs, push them to docs repo as a PR (#61255) 2024-03-21 09:20:47 +00:00
docker-images syntax-highlighter: Add snapshot test for Groovy (#60819) 2024-03-04 20:29:07 +01:00
internal Claude 3 support and /messages API for Enterprise (#60953) 2024-03-22 16:19:04 +01:00
lib telemetry-gateway: implement Managed Services receiver (#61022) 2024-03-15 18:51:54 +08:00
migrations Add double hash index for CodyGatewayDotcomUserByToken (#60695) 2024-02-22 13:05:13 +01:00
monitoring fix/monit: print query details correctly in docs (#61287) 2024-03-20 10:01:32 +00:00
schema Claude 3 support and /messages API for Enterprise (#60953) 2024-03-22 16:19:04 +01:00
testing bazel: use transitions to apply cross-compile platform automatically to oci_image (#60569) 2024-02-20 13:57:56 +00:00
third_party bazel: patch rules_oci to run tar with --no-xattrs (#61004) 2024-03-11 19:27:37 +00:00
third-party-licenses chore: update third-party licenses (#59370) 2024-01-08 10:12:45 +02:00
tools feat/ci: when detecting changes affecting the generated docs, push them to docs repo as a PR (#61255) 2024-03-21 09:20:47 +00:00
ui/assets Revert "use vite for web builds (#58228)" (#59132) 2023-12-20 16:23:45 -03:00
wolfi-images repoupdater: Drop p4 binary from base image (#60324) 2024-02-14 15:06:51 +01:00
wolfi-packages Update perforce CDN urls to use stable versions (#60784) 2024-03-07 16:51:59 +00:00
.bazel_fix_commands.json SG Start Bazel Improvements Take 2 (#60687) 2024-03-05 01:44:21 -08:00
.bazelignore bazel: reintroduce bazelignore entries for deleted directories (#59638) 2024-01-16 15:13:39 +00:00
.bazeliskrc chore: upgrade to Aspect CLI 5.8.19 (#59203) 2024-01-02 15:13:24 +01:00
.bazelrc bump aspect bazel-lib to 1.40.3 (#60869) 2024-03-06 13:07:24 +00:00
.bazelversion bazel: bump to 7.1 (#61092) 2024-03-13 14:52:25 +00:00
.dockerignore use esbuild for client/web builds (#57365) 2023-10-23 10:59:06 -07:00
.editorconfig proto: Add editorconfig to ident using two spaces (#57281) 2023-10-03 00:39:42 +00:00
.eslintrc.js Revert vs-code extension deleting (#61258) 2024-03-20 13:53:27 +01:00
.gitattributes github: show bazel diff again (#54719) 2023-07-07 16:43:45 +00:00
.gitignore Chore: clean up .gitignore (#61182) 2024-03-15 13:15:37 +00:00
.graphqlrc.yml
.hadolint.yaml bump comby version to 1.7.1 (#35830) 2022-05-20 20:12:01 -07:00
.mailmap mailmap: add entries for Eric and Renovate (#50966) 2023-04-25 09:42:22 +02:00
.mocharc.js reapply "switch from jest to vitest for faster, simpler tests (#57886)" (#58145) 2023-11-07 12:00:18 +02:00
.npmrc pnpm: remove update notifier message (#51630) 2023-05-10 08:53:39 +02:00
.percy.yml ci: percy defer snapshots upload (#54116) 2023-06-25 18:57:49 -07:00
.pre-commit-config.yaml exclude pnpm-lock.yaml from precommit (#61158) 2024-03-14 15:35:14 +00:00
.prettierignore svelte: Improve search stream handling wrt filters (#59765) 2024-01-31 15:59:34 +01:00
.stylelintignore rework plugin structure and implement frontside blogpost (#46883) 2023-02-15 11:49:51 +02:00
.stylelintrc.json web: drop bootstrap depenedency (#41401) 2022-09-07 03:11:26 -07:00
.swcrc use swc instead of babel for faster bazel typescript transpilation (#57912) 2023-11-02 22:49:03 -07:00
.tool-versions bump to Go 1.22.1 (#60902) 2024-03-06 17:38:43 -07:00
.trivyignore ci: ignore benign CVE-2021-43816 in prometheus (#31069) 2022-02-11 16:49:10 +00:00
BUILD.bazel ci: debug logging for sg lint changed files (#60707) 2024-02-22 21:37:23 +00:00
CHANGELOG.md chore(changelog): update changelog to say 5.3.3 (#61330) 2024-03-21 11:27:53 -07:00
CODENOTIFY nix: update pnpm hash (#51512) 2023-05-05 12:51:59 +00:00
CONTRIBUTING.md Docs: update links to point to new site (#60381) 2024-02-13 00:23:47 +00:00
deps.bzl Remove profanity and phrase detection (#61297) 2024-03-21 09:09:43 +00:00
doc.go
eslint-relative-formatter.js bazel: implement custom ESLint Bazel rule (#52062) 2023-05-22 04:05:45 -07:00
flake.lock nix: update nixpkgs for go1.22.1 (#61016) 2024-03-12 08:19:28 +00:00
flake.nix nix: patch bazel_7 with hardcoded bin paths (#59359) 2024-01-16 20:58:22 +00:00
gen.go chore: fixup go-mockgen run statement (#61028) 2024-03-12 13:06:36 +00:00
go.mod Remove profanity and phrase detection (#61297) 2024-03-21 09:09:43 +00:00
go.sum Remove profanity and phrase detection (#61297) 2024-03-21 09:09:43 +00:00
graphql-schema-linter.config.js
LICENSE relicense all paths other than MIT licensed code, client/cody*, jetbrains, VS code, and browser extension to enterprise (#53345) (#53345) 2023-06-13 10:28:11 -07:00
LICENSE.enterprise Update marketing website link in monorepo (#58449) 2023-12-01 22:22:34 +00:00
linter_deps.bzl build: add buildifier check to Aspect Workflows (#58566) 2023-11-27 14:58:01 +02:00
mockgen.temp.yaml Move ArchiveReader's git exec command to gitcli (#59933) 2024-02-13 13:40:45 +02:00
mockgen.test.yaml Remove unseen product-subscription tokens (#60585) 2024-02-20 13:37:27 +00:00
mockgen.yaml bazel: native go-mockgen in Bazel (#60386) 2024-02-16 13:26:48 +00:00
nogo_config.json gitserver: Fully sunset p4 exec endpoint (#60327) 2024-02-14 17:24:18 +01:00
package.json Revert vs-code extension deleting (#61258) 2024-03-20 13:53:27 +01:00
pnpm-lock.yaml Revert vs-code extension deleting (#61258) 2024-03-20 13:53:27 +01:00
pnpm-workspace.yaml cody: development branch (#49761) 2023-03-23 20:41:11 +01:00
postcss.config.js extensibility: add featured extensions to registry (#21665) 2021-06-10 13:55:20 -04:00
prettier.config.js clean up Cody CSS to increase shareability and improve display in web app (#50279) 2023-04-03 12:29:05 -07:00
README.md Docs: update links to point to new site (#60381) 2024-02-13 00:23:47 +00:00
release.yaml release: add permission type for BUILDKITE_ACCESS_TOKEN (#61292) 2024-03-20 12:35:19 +00:00
renovate.json Require approval to run Renovate (#57608) 2023-10-18 20:36:53 +02:00
SECURITY.md
service-catalog.yaml lib/servicecatalog: init to distribute catalog (#46999) 2023-01-26 17:22:27 -08:00
sg.config.yaml telemetry-gateway: implement Managed Services receiver (#61022) 2024-03-15 18:51:54 +08:00
shell.nix bump to Go 1.22.1 (#60902) 2024-03-06 17:38:43 -07:00
stamp_tags.bzl Switch to OCI/Wolfi based image (#52693) 2023-06-02 12:12:52 +02:00
tsconfig.base.json web: fix pnpm-lock issue (#47478) 2023-02-09 22:04:31 -08:00
tsconfig.json Revert vs-code extension deleting (#61258) 2024-03-20 13:53:27 +01:00
vitest.shared.ts code intel: Don't rely on URL polyfill to correctly parse git: URIs (#58258) 2023-11-17 19:32:46 +01:00
vitest.workspace.ts vitest: Fix workspace config wrt client/web/ (#58397) 2023-11-17 08:22:46 +00:00
WORKSPACE chore: bump golang/protobuf to 1.5.4 because of nonsense (#61127) 2024-03-13 23:57:03 +00:00

DocsContributingTwitterDiscord

Build status Scorecard Latest release Discord Contributors


Sourcegraph makes it easy to read, write, and fix code—even in big, complex codebases.

  • Code search: Search all of your repositories across all branches and all code hosts.
  • Code intelligence: Navigate code, find references, see code owners, trace history, and more.
  • Fix and refactor: Roll out large-scale changes to many repositories at once and track big migrations.

Getting started



Development

Refer to the Developing Sourcegraph guide to get started.

Documentation

The doc directory has additional documentation for developing and understanding Sourcegraph:

License

This repository contains primarily non-OSS-licensed files. See LICENSE.