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

Support for Amazon Bedrock #2

Open
vkameswaran opened this issue Apr 24, 2024 · 1 comment
Open

Support for Amazon Bedrock #2

vkameswaran opened this issue Apr 24, 2024 · 1 comment

Comments

@vkameswaran
Copy link

Is your feature request related to a problem? Please describe.
No current support for Amazon Bedrock

Describe the solution you'd like
Support added for Amazon Bedrock

Due to privacy concerns with OpenAI and it's sub products, I'd love to use this with Amazon Bedrock. Direct integration with the go SDK would be awesome but either way, love to see this added.

Copy link

greptile-apps bot commented Apr 24, 2024

To add support for Amazon Bedrock, follow these steps:

  1. Extend Configuration:
    Update /config/models.go to include configuration fields for Amazon Bedrock, similar to how OpenAI and Anthropic are configured. This might include fields for API keys, endpoints, and any other necessary configuration.

    type LLM struct {
        ...
        BedrockAPIKey     string `mapstructure:"bedrock_api_key"`
        BedrockEndpoint   string `mapstructure:"bedrock_endpoint"`
    }
  2. Implement Bedrock LLM Client:
    Create a new file in /pkg/llms, perhaps named llm_bedrock.go, to implement the LLM interface for Amazon Bedrock. This will involve creating a struct that adheres to the ZepLLM interface and implementing the necessary methods to interact with the Bedrock API.

    Example skeleton:

    type ZepBedrockLLM struct {
        client *bedrock.Client
    }
    
    func NewBedrockLLM(ctx context.Context, cfg *config.Config) (*ZepBedrockLLM, error) {
        // Initialize and return a new ZepBedrockLLM instance
    }
    
    // Implement other necessary methods here
  3. Integration:
    Ensure that the new Bedrock LLM client is properly integrated within the Zep ecosystem, which includes being selectable based on configuration and used in places where LLMs are utilized.

By following these steps, you'll extend the Zep codebase to support Amazon Bedrock, aligning with the project's architecture and existing patterns for LLM integration.

References

greptileai/zep/config/models.go
greptileai/zep/pkg/llms/llm_base.go
greptileai/zep/pkg/llms/llm_openai_test.go
greptileai/zep/pkg/llms

Ask Greptile

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

No branches or pull requests

1 participant