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

feat: streaming for standard brain picking #385

Merged
merged 26 commits into from
Jun 30, 2023

Conversation

mattzcarey
Copy link
Contributor

@mattzcarey mattzcarey commented Jun 27, 2023

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Standard brain picking (BE)
Frontend

TODO: OpenAI function future PR

Checklist before requesting a review

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented hard-to-understand areas
  • I have ideally added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Screenshots (if appropriate):

@vercel
Copy link

vercel bot commented Jun 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2023 7:20am
quivrapp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2023 7:20am

Co-authored-by: Mamadou DICKO <mamadoudicko@users.noreply.github.com>
Co-authored-by: Mamadou DICKO <mamadoudicko@users.noreply.github.com>
Co-authored-by: Mamadou DICKO <mamadoudicko@users.noreply.github.com>
Copy link
Collaborator

@StanGirard StanGirard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove brainpicking.cpython

@@ -25,6 +25,7 @@ def __init__(
def similarity_search(
self,
query: str,
user_id: str = "none",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the big we previously had with the documents? I'll check it out today anyway.

Copy link
Collaborator

@StanGirard StanGirard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Remove cpython file
  • Explain or remove supabase.py str for user_id.

Else looks good <3
Test and build work

const currentChatId = chatId;
const chatHistory = await getChatHistory(currentChatId);

if (chatId === currentChatId && chatHistory.length > 0) {
Copy link
Contributor

@mamadoudicko mamadoudicko Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure to understand what is happening here:

const currentChatId = chatId;
if(chatId === currentChatId)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair :) that's dead. I think I didnt spot the line above.

@@ -0,0 +1,13 @@
export const generateUUID = (): string => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can now be removed i think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes definitely.

Copy link
Contributor

@mamadoudicko mamadoudicko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job @mattzcarey !

Few low Loggaf returns but LGFM!

@StanGirard StanGirard merged commit 6f047f4 into main Jun 30, 2023
2 checks passed
@mattzcarey mattzcarey deleted the feat/mc/sse-response-streaming branch June 30, 2023 08:27
StanGirard pushed a commit that referenced this pull request Sep 12, 2023
* feat: streaming for standard brain picking

* fix(bug): private llm

* wip: test

Co-authored-by: Mamadou DICKO <mamadoudicko@users.noreply.github.com>

* wip: almost good

Co-authored-by: Mamadou DICKO <mamadoudicko@users.noreply.github.com>

* feat: useFetch

* chore: remove 💀

* chore: fix linting

* fix: forward the request if not streaming

* feat: streaming for standard brain picking

* fix(bug): private llm

* wip: test

Co-authored-by: Mamadou DICKO <mamadoudicko@users.noreply.github.com>

* wip: almost good

Co-authored-by: Mamadou DICKO <mamadoudicko@users.noreply.github.com>

* feat: useFetch

* chore: remove 💀

* chore: fix linting

* fix: forward the request if not streaming

* fix: 💀 code

* fix: check_user_limit

* feat: brain_id to new chat stream

* fix: missing imports

* feat: message_id created on backend

Co-authored-by: Mamadou DICKO <mamadoudicko@users.noreply.github.com>

* chore: remove dead

* remove: cpython

* remove: dead

---------

Co-authored-by: Mamadou DICKO <mamadoudicko@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants