Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow AI interactions to be proxied through Zed's server so you don't need an API key #7367

Merged
merged 68 commits into from
Mar 19, 2024

Conversation

nathansobo
Copy link
Contributor

@nathansobo nathansobo commented Feb 5, 2024

Co-authored-by: Antonio antonio@zed.dev

Resurrected this from some assistant work I did in Spring of 2023.

  • Resurrect streaming responses
  • Use streaming responses to enable AI via Zed's servers by default (but preserve API key option for now)
  • Simplify protobuf
  • Proxy to OpenAI on zed.dev
  • Proxy to Gemini on zed.dev
  • Improve UX for switching between openAI and google models
    • We current disallow cycling when setting a custom model, but we need a better solution to keep OpenAI models available while testing the google ones
  • Show remaining tokens correctly for Google models
  • Remove semantic index
  • Delete ai crate
  • Cloud front so we can ban abuse
  • Rate-limiting
  • Fix panic when using inline assistant
  • Double check the upgraded AssistantSettings are backwards-compatible
  • Add hosted LLM interaction behind a language-models feature flag.

Release Notes:

  • We are temporarily removing the semantic index in order to redesign it from scratch.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 5, 2024
@mikayla-maki mikayla-maki assigned nathansobo and unassigned nathansobo Feb 9, 2024
Resurrected this from some assistant work I did in Spring of 2023.

Co-Authored-By: Antonio <antonio@zed.dev>
as-cii and others added 10 commits February 15, 2024 19:36
Co-Authored-By: Thorsten <thorsten@zed.dev>
Co-Authored-By: Thorsten <thorsten@zed.dev>
Co-Authored-By: Thorsten <thorsten@zed.dev>
Co-Authored-By: Nathan <nathan@zed.dev>
…ates

Co-Authored-By: Thorsten <thorsten@zed.dev>
Co-Authored-By: Nathan <nathan@zed.dev>
… panel

Co-Authored-By: Nathan <nathan@zed.dev>
as-cii and others added 12 commits February 16, 2024 19:13
Currently getting a connection aborted error in my basic_stream example.

Had the idea of using a event-oriented JSON parser `struson` to parse an incomplete array
of objects that they send. The types defined in google_ai.rs should cover what they send
back to us.
Co-Authored-By: Thorsten <thorsten@zed.dev>
# Conflicts:
#	crates/collab/src/lib.rs
Co-Authored-By: Thorsten <thorsten@zed.dev>
Co-Authored-By: Nathan <nathan@zed.dev>
Co-Authored-By: Thorsten Ball <thorsten@zed.dev>
nathansobo and others added 8 commits March 8, 2024 09:42
# Conflicts:
#	Cargo.lock
#	crates/ai/src/prompts/base.rs
#	crates/assistant/src/assistant_panel.rs
#	crates/search/src/project_search.rs
#	crates/semantic_index/src/semantic_index.rs
#	crates/semantic_index/src/semantic_index_tests.rs
#	crates/util/src/http.rs
@as-cii as-cii marked this pull request as ready for review March 18, 2024 10:23
@as-cii as-cii merged commit 8ae5a3b into main Mar 19, 2024
9 checks passed
@as-cii as-cii deleted the rpc-streams branch March 19, 2024 18:22
pjlast pushed a commit to pjlast/zed that referenced this pull request Mar 26, 2024
… need an API key (zed-industries#7367)

Co-authored-by: Antonio <antonio@zed.dev>

Resurrected this from some assistant work I did in Spring of 2023.
- [x] Resurrect streaming responses
- [x] Use streaming responses to enable AI via Zed's servers by default
(but preserve API key option for now)
- [x] Simplify protobuf
- [x] Proxy to OpenAI on zed.dev
- [x] Proxy to Gemini on zed.dev
- [x] Improve UX for switching between openAI and google models
- We current disallow cycling when setting a custom model, but we need a
better solution to keep OpenAI models available while testing the google
ones
- [x] Show remaining tokens correctly for Google models
- [x] Remove semantic index
- [x] Delete `ai` crate
- [x] Cloud front so we can ban abuse
- [x] Rate-limiting
- [x] Fix panic when using inline assistant
- [x] Double check the upgraded `AssistantSettings` are
backwards-compatible
- [x] Add hosted LLM interaction behind a `language-models` feature
flag.

Release Notes:

- We are temporarily removing the semantic index in order to redesign it
from scratch.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Max <max@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants