Adds Groq support#294
Conversation
|
Groq support was added in #338 |
|
@brainlid This was for Groq (https://groq.com/) not Grok (https://x.ai/api). Groq is a managed provider for open models that provides fast inference. |
|
@brainlid previously I was content to use this in my personal fork, but I find myself needing this again in an official capacity for work. Before I work to bring it back up to date with the latest langchain, I should ask: is this something you're likely to accept as a contribution? |
|
Hi @masegraye! Sorry, I didn't catch the service difference. Yes, I'd accept this as a contribution. I'll reopen it. However, there are a few changes I'd request. Don't include:
While cool, it's not something any of the other services are doing either. In assert get_in(data, [:messages, Access.at(0), "role"]) == :user
assert get_in(data, [:messages, Access.at(0), "content"]) == user_message
assert get_in(data, [:messages, Access.at(1), "role"]) == :assistant
assert get_in(data, [:messages, Access.at(1), "content"]) == assistant_messageI much prefer using pattern matches to assert a data shape because it's easier to look at a test and know what it's doing and testing. Thanks! |
Groq is largely OpenAI compatible, with a few quirks.
./scripts/groq_chat.shlets you interactively test chatting with Groq modelsNOTE: I was only able to test this code in isolation - not with anything that required the various keys in test_helper.exs be set.