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

feat: Add Heurist API Integration as New Model Provider #335

Merged
merged 10 commits into from
Nov 15, 2024

Conversation

tsubasakong
Copy link
Contributor

Relates to:

Risks

Low - This change adds a new model provider integration (Heurist) with proper API key handling and follows existing patterns for model providers.

Background

What is Heurist?

Heurist is a DePIN (Decentralized Physical Infrastructure Network) protocol for AI inference that:

  • Aggregates compute resources from GPU owners and data centers to provide cost-effective API access to open source models

  • Reduces costs by 60-95% compared to closed source alternatives

  • Has processed over 1 billion AI inference requests

  • Has 11k unique addresses contributing GPUs since April 2024

  • Powers multiple production applications including:

  • Partners with key infrastructure providers like Aethir, Exabits, Spheron, Gateway Network

What does this PR do?

This PR adds support for the Heurist API as a new model provider. Specifically:

  1. Adds HEURIST_API_KEY configuration
  2. Implements Heurist model provider integration
  3. Adds Heurist model configurations
  4. Updates API key handling logic to support Heurist provider
  5. Adds model settings configuration including temperature, tokens, and other parameters

The integration allows us to leverage Heurist's cost-effective infrastructure for accessing open source LLMs while maintaining our existing architecture patterns.

What kind of change is this?

Features (non-breaking change which adds functionality)

Documentation changes needed?

My changes require a change to the project documentation to document:

  • New HEURIST_API_KEY configuration option (free API key can be applied here )
  • Available Heurist models and their capabilities
  • Model configuration parameters

Testing

Where should a reviewer start?

  1. Review the model configuration in packages/core/src/models.ts
  2. Check API key handling in .env.example
  3. Review the generateText implementation for Heurist in packages/core/src/generation.ts

Detailed testing steps

  1. Configure HEURIST_API_KEY in environment
  2. Test text generation using configured model by pnpm start

Screenshots

N/A - Backend API integration changes only

Deploy Notes

  • Requires setting up HEURIST_API_KEY in production environment
  • No database changes required

@lalalune
Copy link
Member

This is awesome, would you mind adding an "integrations" section and docs with all the Heurist info and stuff (like an integrations dir)? Basically whatever is clean and helps users understand the value prop, get setup and onboarded

@lalalune lalalune merged commit 4d1e66c into elizaOS:main Nov 15, 2024
@tsubasakong
Copy link
Contributor Author

This is awesome, would you mind adding an "integrations" section and docs with all the Heurist info and stuff (like an integrations dir)? Basically whatever is clean and helps users understand the value prop, get setup and onboarded

Yeah sure! Updated the Heurist integration documents in this PR #339

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants