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

Fixed #4229 #4278

Merged
merged 36 commits into from
May 20, 2023
Merged

Fixed #4229 #4278

merged 36 commits into from
May 20, 2023

Conversation

konraddroeske
Copy link
Contributor

@konraddroeske konraddroeske commented May 17, 2023

Resolves: #4229

Background

The defaults need to be adapted for people without access to GPT4 - or the corresponding functions won't work. The default model for people without GPT4 access should be cfg.fast_llm_model and not cfg.smart_llm_model.

Changes

Added check_model fn in configurator that sends a request to the OpenAI API using create_chat_completion with the model provided. If an InvalidRequestError is raised, it returns a hard-coded value of "gpt-3.5-turbo".

Documentation

Comments added to the function and test.

Test Plan

Checks if fn returns original model argument if no error.
Checks if fn returns "gpt-3.5-turbo" when InvalidRequestError is raised.

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.
  • I have run black . and isort . against my code to ensure it passes our linter.

@vercel
Copy link

vercel bot commented May 17, 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 May 20, 2023 11:32pm

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.53 🎉

Comparison is base (c30f5b7) 63.26% compared to head (70f2b97) 63.79%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4278      +/-   ##
==========================================
+ Coverage   63.26%   63.79%   +0.53%     
==========================================
  Files          74       74              
  Lines        3427     3447      +20     
  Branches      504      507       +3     
==========================================
+ Hits         2168     2199      +31     
+ Misses       1103     1079      -24     
- Partials      156      169      +13     
Impacted Files Coverage Δ
autogpt/main.py 0.00% <ø> (ø)
autogpt/configurator.py 20.27% <100.00%> (+20.27%) ⬆️
autogpt/llm/api_manager.py 94.44% <100.00%> (+1.11%) ⬆️
autogpt/llm/llm_utils.py 68.38% <100.00%> (+1.71%) ⬆️

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

@github-actions github-actions bot added size/l and removed size/m labels May 17, 2023
@vercel vercel bot temporarily deployed to Preview May 17, 2023 23:28 Inactive
autogpt/llm/llm_utils.py Outdated Show resolved Hide resolved
@github-actions github-actions bot added size/m and removed size/l labels May 17, 2023
@vercel vercel bot temporarily deployed to Preview May 17, 2023 23:45 Inactive
@konraddroeske konraddroeske requested a review from k-boikov May 18, 2023 00:00
@github-actions github-actions bot added size/l and removed size/m labels May 18, 2023
@github-actions github-actions bot removed the size/l label May 18, 2023
@vercel
Copy link

vercel bot commented May 18, 2023

Deployment failed with the following error:

Resource is limited - try again in 55 minutes (more than 100, code: "api-deployments-free-per-day").

@vercel
Copy link

vercel bot commented May 18, 2023

Deployment failed with the following error:

Resource is limited - try again in 47 minutes (more than 100, code: "api-deployments-free-per-day").

@vercel
Copy link

vercel bot commented May 18, 2023

Deployment failed with the following error:

Resource is limited - try again in 10 minutes (more than 100, code: "api-deployments-free-per-day").

@vercel
Copy link

vercel bot commented May 18, 2023

Deployment failed with the following error:

Resource is limited - try again in 9 minutes (more than 100, code: "api-deployments-free-per-day").

@vercel
Copy link

vercel bot commented May 18, 2023

Deployment failed with the following error:

Resource is limited - try again in 4 minutes (more than 100, code: "api-deployments-free-per-day").

@vercel
Copy link

vercel bot commented May 18, 2023

Deployment failed with the following error:

Resource is limited - try again in 3 minutes (more than 100, code: "api-deployments-free-per-day").

@k-boikov k-boikov added this to the v0.3.2 Release milestone May 20, 2023
@vercel vercel bot temporarily deployed to Preview May 20, 2023 23:32 Inactive
@k-boikov k-boikov merged commit 57ea7b5 into Significant-Gravitas:master May 20, 2023
ppetermann pushed a commit to ppetermann/Auto-GPT that referenced this pull request May 22, 2023
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.

The model: gpt-4 does not exist / fixing defaults in llm_utils.py
2 participants