Skip to content

feat: add groq provider#134

Merged
salman1993 merged 2 commits intomainfrom
groq
Oct 10, 2024
Merged

feat: add groq provider#134
salman1993 merged 2 commits intomainfrom
groq

Conversation

@michaelneale
Copy link
Collaborator

using:

groq:
provider: groq
processor: llama3-groq-70b-8192-tool-use-preview
accelerator: llama3-groq-70b-8192-tool-use-preview
moderator: truncate
toolkits:

  • name: developer
    requires: {}

is really really fast - but does get lost after a while (as most llama3 ones do) - interesting to watch!

@michaelneale michaelneale changed the title taking a look at groq for speed feat: add groq provider Oct 10, 2024

@classmethod
def from_env(cls: Type["GroqProvider"]) -> "GroqProvider":
cls.check_env_vars(cls.instructions_url)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elenazherdeva whenever we revisit this, we could check this implicitly so the user's don't need to pass it in (e.g. we can do the check for if instructions_url: ...).

what do you think? simplifies the implementation of adding a new provider

@@ -0,0 +1,97 @@
import os
from typing import Any, Dict, List, Tuple, Type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:nit: i think our patterns here don't realize as of python 3.9+ we generally don't need Dict, List, and Tuple anymore we can use the primitives (dict, list, and tuple respectively)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#149 to do this everywhere

return cls(client)

@staticmethod
def get_usage(data: dict) -> Usage:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lifeizhou-ap this might be a useful thing to promote to a @classmethod (not sure i understand when we'd need to use it as a static method Provider.get_usage({...})). let's consider making an abstraction to make adding providers super easy?

payload = {k: v for k, v in payload.items() if v}
response = self._post(payload)

# Check for context_length_exceeded error for single, long input message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

copy pasta? maybe delete?

Copy link
Contributor

@lamchau lamchau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@salman1993 salman1993 merged commit 30a1efe into main Oct 10, 2024
ahau-square pushed a commit that referenced this pull request Oct 10, 2024
* main:
  feat: add groq provider (#134)
  feat: add a deep thinking reasoner model (o1-preview/mini) (#68)
  fix: use concrete SessionNotifier (#135)
  feat: add guards to session management (#101)
  fix: Set default model configuration for the Google provider. (#131)
  test: convert Google Gemini tests to VCR (#118)
  chore: Add goose providers list command (#116)
  docs: working ollama for desktop (#125)
  docs: format and clean up warnings/errors (#120)
  docs: update deploy workflow (#124)
  feat: Implement a goose run command (#121)
lukealvoeiro added a commit that referenced this pull request Oct 17, 2024
* main: (23 commits)
  feat: Run with resume session (#153)
  refactor: move langfuse wrapper to a module in exchange instead of a package (#138)
  docs: add subheaders to the 'Other ways to run Goose' section (#155)
  fix: Remove tools from exchange when summarizing files (#157)
  chore: use primitives instead of typing imports and fixes completion … (#149)
  chore: make vcr tests pretty-print JSON (#146)
  chore(release): goose 0.9.5 (#159)
  chore(release): exchange 0.9.5 (#158)
  chore: updates ollama default model from mistral-nemo to qwen2.5 (#150)
  feat: add vision support for Google (#141)
  fix: session resume with arg handled incorrectly (#145)
  docs: add release instructions to CONTRIBUTING.md (#143)
  docs: add link to action, IDE words (#140)
  docs: goosehints doc fix only (#142)
  chore(release): release 0.9.4 (#136)
  revert: "feat: add local langfuse tracing option  (#106)" (#137)
  feat: add local langfuse tracing option  (#106)
  feat: add groq provider (#134)
  feat: add a deep thinking reasoner model (o1-preview/mini) (#68)
  fix: use concrete SessionNotifier (#135)
  ...
@lamchau lamchau deleted the groq branch October 24, 2024 11:44
ahau-square pushed a commit that referenced this pull request May 2, 2025
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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.

4 participants

Comments