Spaces:
Sleeping
Sleeping
Download scripts/llm/runner.py from ayushsinghal1510/cropf-ai-api: direct link, hf CLI and curl.
- Browser
- Download file 302 Bytes
-
https://huggingface.co/spaces/ayushsinghal1510/cropf-ai-api/resolve/main/scripts/llm/runner.py
- Command line
-
hf download hf://spaces/ayushsinghal1510/cropf-ai-api/scripts/llm/runner.py
-
curl -L -o runner.py https://huggingface.co/spaces/ayushsinghal1510/cropf-ai-api/resolve/main/scripts/llm/runner.py
302 Bytes
| from groq import Groq | |
| async def run_groq(messages : list , groq_client : Groq, model = 'llama-3.3-70b-versatile') -> str : | |
| chat_completion = groq_client.chat.completions.create( | |
| messages = messages , | |
| model = model | |
| ) | |
| return str(chat_completion.choices[0].message.content) |