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

Integrate plugin.handle_text_embedding hook #2804

Conversation

zhanglei1172
Copy link
Contributor

Background

Currently, the plugin has provided an interface that can replace OpenAI's text completion, but for users who want to run everything locally, using custom models for embeddings is also very necessary.

Changes

In autogpt/models/base_open_ai_plugin.py add can_handle_text_embedding(...) and handle_text_embedding(...).

In autogpt/llm_utils.py add for plugin in CFG.plugins:...

Documentation

Test Plan

tests/unit/models/test_base_open_api_plugin.py passes

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

@ntindle ntindle requested a review from BillSchumacher April 22, 2023 07:50
@ntindle ntindle added enhancement New feature or request needs discussion To be discussed among maintainers labels Apr 22, 2023
@ntindle ntindle requested a review from richbeales April 22, 2023 08:10
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 25, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot removed the size/m label Apr 26, 2023
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size

@zhanglei1172 zhanglei1172 force-pushed the add-new-feature-custom-embedding-in-plugin branch from a3b379b to 3a1cf98 Compare April 26, 2023 04:27
@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Apr 26, 2023
@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions bot added size/m and removed size/xl labels Apr 26, 2023
@ddannyc
Copy link

ddannyc commented Apr 27, 2023

Need this pr

@ntindle
Copy link
Member

ntindle commented Apr 27, 2023

Can you take a look at whats going on with the tests?

@ddannyc ddannyc mentioned this pull request Apr 28, 2023
5 tasks
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 28, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@zhanglei1172 zhanglei1172 force-pushed the add-new-feature-custom-embedding-in-plugin branch from 3a1cf98 to 69599da Compare April 29, 2023 01:11
@vercel
Copy link

vercel bot commented Apr 29, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Apr 29, 2023 1:27am

@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Apr 29, 2023
@codecov
Copy link

codecov bot commented Apr 29, 2023

Codecov Report

Patch coverage: 53.33% and project coverage change: -0.01 ⚠️

Comparison is base (c821b29) 51.02% compared to head (5a2b971) 51.02%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2804      +/-   ##
==========================================
- Coverage   51.02%   51.02%   -0.01%     
==========================================
  Files         118      118              
  Lines        4886     4898      +12     
  Branches      643      649       +6     
==========================================
+ Hits         2493     2499       +6     
- Misses       2212     2215       +3     
- Partials      181      184       +3     
Impacted Files Coverage Δ
autogpt/memory/vector/utils.py 72.09% <50.00%> (-11.78%) ⬇️
autogpt/models/base_open_ai_plugin.py 96.66% <100.00%> (+1.66%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@p-i-
Copy link
Contributor

p-i- commented May 5, 2023

This is a mass message from the AutoGPT core team.
Our apologies for the ongoing delay in processing PRs.
This is because we are re-architecting the AutoGPT core!

For more details (and for infor on joining our Discord), please refer to:
https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label May 25, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@Pwuts Pwuts self-assigned this Jul 14, 2023
@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Jul 14, 2023
@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@netlify
Copy link

netlify bot commented Jul 14, 2023

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit ff51c5a
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/64b1b2c0650f0700084876c1

@netlify
Copy link

netlify bot commented Jul 14, 2023

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 5a2b971
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/64b1f0abefba310008e26b93

@Pwuts Pwuts added this to the v0.4.6 Release milestone Jul 14, 2023
@Pwuts Pwuts changed the title add feature custom text embedding in plugin Integrate plugin.handle_text_embedding hook Jul 14, 2023
@Pwuts Pwuts force-pushed the add-new-feature-custom-embedding-in-plugin branch from 21aac77 to 4d3d21f Compare July 14, 2023 20:58
@Pwuts Pwuts force-pushed the add-new-feature-custom-embedding-in-plugin branch from 4d3d21f to 818f381 Compare July 14, 2023 21:02
@Pwuts Pwuts merged commit 5ae044f into Significant-Gravitas:master Jul 15, 2023
dayofthedave pushed a commit to dayofthedave/Auto-GPT that referenced this pull request Jul 17, 2023
)

* add feature custom text embedding in plugin

* black code format

* _get_embedding_with_plugin()

* Fix docstring & type hint

---------

Co-authored-by: Reinier van der Leer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request function: plugins needs discussion To be discussed among maintainers size/m
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants