Skip to content

Commit

Permalink
fix: groq api key env var (#188)
Browse files Browse the repository at this point in the history
* fix: groq api key env var

* fix PR policy

* fix master reference
  • Loading branch information
henomis authored Apr 11, 2024
1 parent f6a1529 commit 21dd700
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 9 deletions.
14 changes: 13 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,16 @@ Please describe the tests that you ran to verify your changes. Provide instructi
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have checked my code and corrected any misspellings
- [ ] I have checked my code and corrected any misspellings

## Policy on Unattended Pull Requests

As part of our commitment to maintaining an active and collaborative development environment, it's important for pull requests (PRs) to receive timely attention and feedback. PRs left unattended for an extended period can impede progress and create bottlenecks in the development process.

Therefore, if a PR remains unapproved and unmodified following a review for an extended period, the author of the PR reserves the right to implement the suggested modifications at their discretion.

The specific duration of time before this policy is enacted may vary depending on the circumstances and urgency of the changes. However, as a general guideline, a reasonable timeframe for review and action might be 2 weeks.

This policy aims to ensure the continued progress of the project while respecting the contributions and efforts of all team members. It encourages timely collaboration and feedback while preventing PRs from stagnating indefinitely.

If you anticipate being unable to review or address a PR within the specified timeframe, please communicate this with the team to avoid invoking this policy unnecessarily.
16 changes: 15 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ All types of contributions are encouraged and valued. See the [Table of Contents
- [Suggesting Enhancements](#suggesting-enhancements)
- [Your First Code Contribution](#your-first-code-contribution)
- [Improving The Documentation](#improving-the-documentation)
- [Policy on unattended Pull Requests](#policy-on-unattended-pull-requests)
- [Styleguides](#styleguides)
- [Commit Messages](#commit-messages)
- [Join The Project Team](#join-the-project-team)
Expand All @@ -29,7 +30,7 @@ All types of contributions are encouraged and valued. See the [Table of Contents
## Code of Conduct

This project and everyone participating in it is governed by the
[LinGoose Code of Conduct](https://github.com/henomis/lingooseblob/master/CODE_OF_CONDUCT.md).
[LinGoose Code of Conduct](https://github.com/henomis/lingooseblob/main/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior
to <[email protected]>.

Expand Down Expand Up @@ -128,6 +129,19 @@ Follow the [first contribution guide](https://github.com/firstcontributions/firs

LinGoose could always use more documentation, whether as part of the official LinGoose docs, in docstrings, or even on the web in blog posts, articles, and such.

## Policy on unattended Pull Requests

As part of our commitment to maintaining an active and collaborative development environment, it's important for pull requests (PRs) to receive timely attention and feedback. PRs left unattended for an extended period can impede progress and create bottlenecks in the development process.

Therefore, if a PR remains unapproved and unmodified following a review for an extended period, the author of the PR reserves the right to implement the suggested modifications at their discretion.

The specific duration of time before this policy is enacted may vary depending on the circumstances and urgency of the changes. However, as a general guideline, a reasonable timeframe for review and action might be 2 weeks.

This policy aims to ensure the continued progress of the project while respecting the contributions and efforts of all team members. It encourages timely collaboration and feedback while preventing PRs from stagnating indefinitely.

If you anticipate being unable to review or address a PR within the specified timeframe, please communicate this with the team to avoid invoking this policy unnecessarily.


## Styleguides

Please referr to [Go style guide](https://google.github.io/styleguide/go/) when contributing to the project.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ If you think you've found a bug, or something isn't behaving the way you think i

## Contributing

We welcome contributions, Read our [Contribution Guidelines](https://github.com/henomis/lingoose/blob/master/CONTRIBUTING.md) to learn more about contributing to **LinGoose**
We welcome contributions, Read our [Contribution Guidelines](https://github.com/henomis/lingoose/blob/main/CONTRIBUTING.md) to learn more about contributing to **LinGoose**

## Connect with the author

Expand Down
5 changes: 4 additions & 1 deletion docs/content/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ You need to set the `NOMIC_API_KEY` environment variable to your Nomic API key.
You need to set the `ANTHROPIC_API_KEY` environment variable to your Anthropic API key. To get your API key refer to the [Anthropic website](https://anthropic.com/).

## Voyage AI
You need to set the `VOYAGE_API_KEY` environment variable to your Voyage AI API key. To get your API key refer to the [Voyage AI website](https://www.voyageai.com/).
You need to set the `VOYAGE_API_KEY` environment variable to your Voyage AI API key. To get your API key refer to the [Voyage AI website](https://www.voyageai.com/).

## Groq
You need to set the `GROQ_API_KEY` environment variable to your Groq API key. To get your API key refer to the [Groq website](https://groq.com/).
2 changes: 1 addition & 1 deletion docs/layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1>{{ .LinkTitle }}</h1>
<div class="description">{{ .Title }}</div>
<a class="header-link"
target="_blank"
href="https://github.com/henomis/lingoose/blob/master/docs/content/{{.File.Path }}">
href="https://github.com/henomis/lingoose/blob/main/docs/content/{{.File.Path }}">
[edit]
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/layouts/partials/version-banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
{{ $versions := split $versionString "," }}
{{ $latestVersion := index $versions 0 }}

{{ if (eq $currentVersion "master") }}
{{ if (eq $currentVersion "main") }}
<div class="alert-warning">
You are looking at the docs for the unreleased <code>master</code> branch. The latest version is <a href="/{{$latestVersion}}">{{ $latestVersion }}</a>.
You are looking at the docs for the unreleased <code>main</code> branch. The latest version is <a href="/{{$latestVersion}}">{{ $latestVersion }}</a>.
</div>
{{ else if not (eq $latestVersion $currentVersion) }}
<div class="alert-warning">
Expand Down
2 changes: 1 addition & 1 deletion examples/llm/groq/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func main() {
// The Groq API key is expected to be set in the OPENAI_API_KEY environment variable
// The Groq API key is expected to be set in the GROQ_API_KEY environment variable
groqllm := groq.New().WithModel("mixtral-8x7b-32768")

t := thread.New().AddMessage(
Expand Down
2 changes: 1 addition & 1 deletion llm/groq/groq.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Groq struct {
}

func New() *Groq {
customConfig := goopenai.DefaultConfig(os.Getenv("OPENAI_API_KEY"))
customConfig := goopenai.DefaultConfig(os.Getenv("GROQ_API_KEY"))
customConfig.BaseURL = groqAPIEndpoint
customClient := goopenai.NewClientWithConfig(customConfig)

Expand Down

0 comments on commit 21dd700

Please sign in to comment.