Skip to content

Idea to changes to work with groq #1

@akupka

Description

@akupka

Hello I like your project but I have simular problems with Ollama like you. Therefore I use groq (for my use case no problem). Only two litte changes in your notebook.

from groq import Groq
groq_api_key="your API key"

client = Groq(
    # This is the default and can be omitted
    api_key=groq_api_key,
)
  1. in your def graphPrompt
    I changed
   USER_PROMPT = """context: ```input``` \n\n output: """
   USER_PROMPT = USER_PROMPT.replace(('input'),input) 

   chat_completion = client.chat.completions.create(
        messages=[
            {
                "role": "system",
                "content": SYS_PROMPT
            },
            {
                "role": "user",
                "content": USER_PROMPT,
            }
        ],
        model="mixtral-8x7b-32768",
    )
    aux1=(chat_completion.choices[0].message.content)

Thats all

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions