-
Notifications
You must be signed in to change notification settings - Fork 44.9k
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(blocks): Add AI/ML API support to LLM blocks #9163
base: dev
Are you sure you want to change the base?
feat(blocks): Add AI/ML API support to LLM blocks #9163
Conversation
This PR targets the Automatically setting the base branch to |
PR Reviewer Guide πHere are some key observations to aid the review process:
|
β Deploy Preview for auto-gpt-docs canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests β
Additional details and impacted files@@ Coverage Diff @@
## dev #9163 +/- ##
======================================
Coverage ? 33.94%
======================================
Files ? 16
Lines ? 1258
Branches ? 190
======================================
Hits ? 427
Misses ? 804
Partials ? 27
Flags with carried forward coverage won't be shown. Click here to find out more. β View full report in Codecov by Sentry. |
β Deploy Preview for auto-gpt-docs-dev canceled.
|
@@ -35,6 +35,7 @@ | |||
ProviderName.OLLAMA, | |||
ProviderName.OPENAI, | |||
ProviderName.OPEN_ROUTER, | |||
ProviderName.AIML, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ProviderName.AIML, | |
ProviderName.AIML_API, |
same for all other occurrences
autogpt_platform/backend/backend/integrations/credentials_store.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Reinier van der Leer <[email protected]>
Co-authored-by: Reinier van der Leer <[email protected]>
β¦e.py Co-authored-by: Reinier van der Leer <[email protected]>
docs/content/classic/setup/index.md
Outdated
@@ -175,6 +175,19 @@ If you don't know which to choose, you can safely go with OpenAI*. | |||
[anthropic/models]: https://docs.anthropic.com/en/docs/models-overview | |||
|
|||
|
|||
### AI/ML API | |||
1. Make sure you have credits in your account: [Billing -> View Usage](https://aimlapi.com/app/billing?utm_source=autogpt&utm_medium=github&utm_campaign=integration) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we remove all the utm's please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi!
We need the utms to evaluate the traffic from the project, and allocate the developer resources
(basically, I use them to prove to my team that open-source is important, and to grow our open-source integrators part of the team)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @OctavianTheI - happy to discuss this
I've booked a call with you guys tomorrow via your website.
@@ -4,6 +4,7 @@ | |||
# --8<-- [start:ProviderName] | |||
class ProviderName(str, Enum): | |||
ANTHROPIC = "anthropic" | |||
AIML_API = "aiml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AIML_API = "aiml" | |
AIML_API = "aiml_api" |
@@ -433,6 +445,23 @@ def llm_call( | |||
response.usage.prompt_tokens if response.usage else 0, | |||
response.usage.completion_tokens if response.usage else 0, | |||
) | |||
elif provider == "aiml": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elif provider == "aiml": | |
elif provider == "aiml_api": |
@@ -49,6 +49,13 @@ | |||
title="Use Credits for OpenAI", | |||
expires_at=None, | |||
) | |||
aiml_credentials = APIKeyCredentials( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiml_credentials = APIKeyCredentials( | |
aiml_api_credentials = APIKeyCredentials( |
@@ -49,6 +49,13 @@ | |||
title="Use Credits for OpenAI", | |||
expires_at=None, | |||
) | |||
aiml_credentials = APIKeyCredentials( | |||
id="aad82a89-9794-4ebb-977f-d736aa5260a3", | |||
provider="aiml", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
provider="aiml", | |
provider="aiml_api", |
@@ -266,6 +266,7 @@ class Secrets(UpdateTrackingModel["Secrets"], BaseSettings): | |||
) | |||
|
|||
openai_api_key: str = Field(default="", description="OpenAI API key") | |||
aiml_api_key: str = Field(default="", description="AI/ML API key") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiml_api_key: str = Field(default="", description="AI/ML API key") | |
aiml_api_key: str = Field(default="", description="'AI/ML API' key") |
@@ -103,6 +103,7 @@ export default function PrivatePage() { | |||
"6b9fc200-4726-4973-86c9-cd526f5ce5db", // Replicate | |||
"53c25cb8-e3ee-465c-a4d1-e75a4c899c2a", // OpenAI | |||
"24e5d942-d9e3-4798-8151-90143ee55629", // Anthropic | |||
"aad82a89-9794-4ebb-977f-d736aa5260a3", // AI/ML |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"aad82a89-9794-4ebb-977f-d736aa5260a3", // AI/ML | |
"aad82a89-9794-4ebb-977f-d736aa5260a3", // AI/ML API |
@@ -52,6 +52,7 @@ export const providerIcons: Record< | |||
github: FaGithub, | |||
google: FaGoogle, | |||
groq: fallbackIcon, | |||
aiml: fallbackIcon, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiml: fallbackIcon, | |
aiml_api: fallbackIcon, |
@@ -102,6 +102,7 @@ export type CredentialsType = "api_key" | "oauth2"; | |||
// --8<-- [start:BlockIOCredentialsSubSchema] | |||
export const PROVIDER_NAMES = { | |||
ANTHROPIC: "anthropic", | |||
AIML: "aiml", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AIML: "aiml", | |
AIML_API: "aiml_api", |
@@ -16,6 +16,7 @@ const CREDENTIALS_PROVIDER_NAMES = Object.values( | |||
|
|||
// --8<-- [start:CredentialsProviderNames] | |||
const providerDisplayNames: Record<CredentialsProviderName, string> = { | |||
aiml: "AI/ML", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aiml: "AI/ML", | |
aiml_api: "AI/ML API", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please git reset --hard dev -- classic docs/content/classic
Hi, could you review my PR again, please? I've made the changes you suggested. If there are any issues, let me know, and I'll address them. The only thing I couldn't get to work was the git reset --hard dev -- classic docs/content/classic command you recommended. Additionally, I'm unclear about what exactly needs to be added or modified in the checkbox. |
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
Changes ποΈ
Checklist π
For code changes:
max_tokens
parameter values and other configurations.Example test plan
For configuration changes:
.env.example
is updated or already compatible with my changesdocker-compose.yml
is updated or already compatible with my changesExamples of configuration changes