sourcegraph / openctx

See contextual info about code from your dev tools, in your editor, code review, and anywhere else you read code.
https://openctx.org
Apache License 2.0
122 stars 13 forks source link

Call Chat and Language Model APIs? #171

Open thorwebdev opened 1 month ago

thorwebdev commented 1 month ago

I'm trying to create an experience similar to https://marketplace.visualstudio.com/items?itemName=robconery.pg-chat

Vscode allows you to run prompt's in the users Copilot account like this https://code.visualstudio.com/api/extension-guides/language-model

Is this something that's possible for Cody also?

thorwebdev commented 1 month ago

Another thing that would be great, would be the ability to generate embeddings for the user queries. E.g. with the Postgres Provider I'm working on, would be awesome to do a cosine similarity search to retrieve all the relevant context from the Postgres database using pgvector.

sqs commented 2 weeks ago

No, neither of these are possible now with Cody, although you can use require('vscode') in an OpenCtx provider and tap into the entire VS Code extension API, including Copilot's language model API.