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

Feature/llm data structs #3486

Merged
merged 8 commits into from
Apr 28, 2023

Conversation

collijk
Copy link
Contributor

@collijk collijk commented Apr 28, 2023

Background

This PR proposes some data structures for collecting model information and model responses into standard containers. We can then leverage the containers to hide model api specific details into modules that deal specifically with particular providers (code doing this in the next PR).

Changes

Add core abstractions for model information and model responses.

Documentation

Docstrings

Test Plan

N/A. These are data structures with no (well, very little) logic and no current usages.

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

@vercel
Copy link

vercel bot commented Apr 28, 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 28, 2023 10:00pm

Pwuts
Pwuts previously requested changes Apr 28, 2023
Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

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

Since info about the models and their max context length is now in llm/providers/openai.py, settings for that can be removed or given better defaults:
https://github.com/Significant-Gravitas/Auto-GPT/blob/3b74d2150e26ec9387e40cf65a75d8a995d8c9f3/autogpt/config/config.py#L36-L38

@collijk
Copy link
Contributor Author

collijk commented Apr 28, 2023

Since info about the models and their max context length is now in llm/providers/openai.py, settings for that can be removed or given better defaults:

https://github.com/Significant-Gravitas/Auto-GPT/blob/3b74d2150e26ec9387e40cf65a75d8a995d8c9f3/autogpt/config/config.py#L36-L38

Yes, that will be done in a separate PR as it will touch a bunch of files. This PR is to make sure people see the data structures and agree with this representation (got positive feedback from @BillSchumacher , @merwanehamadi , and @ntindle on a PR in my own fork yesterday as I was waiting on a merge for this).

@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.

@ntindle
Copy link
Member

ntindle commented Apr 28, 2023

Since info about the models and their max context length is now in llm/providers/openai.py, settings for that can be removed or given better defaults:

https://github.com/Significant-Gravitas/Auto-GPT/blob/3b74d2150e26ec9387e40cf65a75d8a995d8c9f3/autogpt/config/config.py#L36-L38

Agreed but separate PR imo

@collijk collijk dismissed Pwuts’s stale review April 28, 2023 20:57

Pwuts signed off on my comment explaining we would do other file cleanup in an upcoming PR

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

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

@codecov
Copy link

codecov bot commented Apr 28, 2023

Codecov Report

Patch coverage: 85.00% and project coverage change: +0.23 🎉

Comparison is base (c7d7564) 56.95% compared to head (ce1daf0) 57.19%.

❗ Current head ce1daf0 differs from pull request most recent head db2e6c4. Consider uploading reports for the commit db2e6c4 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3486      +/-   ##
==========================================
+ Coverage   56.95%   57.19%   +0.23%     
==========================================
  Files          67       68       +1     
  Lines        3048     3079      +31     
  Branches      509      516       +7     
==========================================
+ Hits         1736     1761      +25     
- Misses       1174     1180       +6     
  Partials      138      138              
Impacted Files Coverage Δ
autogpt/llm/providers/openai.py 0.00% <0.00%> (ø)
autogpt/llm/base.py 93.54% <93.54%> (ø)
autogpt/agent/agent_manager.py 47.82% <100.00%> (-0.75%) ⬇️
autogpt/llm/__init__.py 100.00% <100.00%> (ø)
autogpt/llm/chat.py 65.16% <100.00%> (ø)
autogpt/llm/llm_utils.py 58.71% <100.00%> (ø)
autogpt/llm/token_counter.py 94.11% <100.00%> (ø)

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

@collijk collijk merged commit b8478a9 into Significant-Gravitas:master Apr 28, 2023
9 checks passed
@collijk collijk deleted the feature/llm-data-structs branch April 28, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants