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

[Brain to API] #1380

Closed
Chloeroumengas opened this issue Oct 10, 2023 · 2 comments
Closed

[Brain to API] #1380

Chloeroumengas opened this issue Oct 10, 2023 · 2 comments
Assignees
Labels
epic Used to tag the issue describing the whole epic Stale
Milestone

Comments

@Chloeroumengas
Copy link

Chloeroumengas commented Oct 10, 2023

  1. AAD, i have a table api_brain_config (aka api_neurons) to stock api configs (table)
    • Each params is: type, name, description
  • Method
  • URL
  • Params as JSON
  • SearchParams as JSON
  • Secrets as JSON: {secretName, type}
  1. AAD, i have a table for api_brain_config_secrets to stock api_brain secrets

TODO: use wording : secret_id

  • Relation : user_id, brain_id, secrets(JSON)
  • Use vault storage for secrets
  • Add a repository Secret (rpc call)
    • Add secret: secret, id
    • Get secret by id
    • Update secret
    • id is user_id-brain_id-secret_name (from brain config)
  1. AAD, i know if brain is doc based or api based in brain table
  • Migration to add brain type
  • Update brain controller (CreateBrainProperties)
  1. AAD, i have a new helper class ApiBasedQA which can retrieve an api attributes from api_neurons_secretsapi_brain_config_secrets and api_brain_config and call an openai function (extend QABaseBrainPicking)
  • in BrainfulChat, instanciate ApiBasedQA if brain type is api else, pick QABaseBrainPicking as currently
  • In ApiBasedQA, handle an forward errors properly
  • Fetch secret when calling api
  1. AAD, i can create an api based brain
  • Update CreateBrainProperties to add fields related to api brain
  • Separate params and values for secrets
  • When feeding brain, check if type is doc based (modular)
  1. AAU, i can specified if my brain is API based or doc based
  • type selection step in creation Modal
  • new Field if api based
  1. AAU, when subscribing to API based brain, i see new fields for secrets
  • if no secret, subscribe directly
  1. AAU, when i select and api brain in chat input, upload modal turns into a brain config modal
  • If not creator, see only secrets fields
  • Else see every fields
  1. AAU, when brain type is api_based, i dont see knowledge tab

  2. AAU, i can delete my ap_based brain

  • Remove secrets based on their name and subscribers id O(n*m)

Notes:

  • Update api brain
  • Create api brain
  • How if secret changed / deleted ?
  • How is params changed ? Deleted ?
  • Delete brain
@Chloeroumengas Chloeroumengas added the epic Used to tag the issue describing the whole epic label Oct 10, 2023
@Chloeroumengas Chloeroumengas added this to the V3 milestone Oct 10, 2023
@dosubot
Copy link

dosubot bot commented Oct 10, 2023

🤖

Hello,

Thank you for your request. Based on the context provided, I understand that you're requesting the development of a new collection type named "use_cases" in the Quivr repository. This collection type will have attributes: "Title", "Description", and "image". The "Title" and "Description" are of type string, while the "image" attribute can be of type media and can accept multiple entries of types "images", "files", "videos", and "audios". The collection type also supports the "draftAndPublish" option.

To implement this feature, we would need to modify the schema.json file located at cms/quivr/src/api/use-case/content-types/use-case/schema.json to include the new collection type and its attributes.

Regarding feature flags, the Quivr codebase uses the GrowthBook library for handling feature flags. You can find the implementation in the FeatureFlagsProvider.tsx file. If you want this feature to be feature flagged, you would need to add a new feature definition in the GrowthBook configuration.

As for similar solved issues, I found 3 similar solved issues in the Quivr repository that might provide some insight:

  1. File which was last updated on September 14, 2023
  2. Prompt Engineering which was last updated on August 27, 2023
  3. Epic which was last updated on August 25, 2023

Please note that these issues might not be directly related to your request, but they could provide some insight into how similar features were implemented in the past.

I hope this information is helpful. If you need further clarification or have additional questions, please let me know.

Best,
Dosu

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

Copy link
Contributor

github-actions bot commented Dec 2, 2023

Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.

@github-actions github-actions bot added the Stale label Dec 2, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Used to tag the issue describing the whole epic Stale
Projects
None yet
Development

No branches or pull requests

2 participants