This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import json | |
| from groq import Groq | |
| def get_language_code(text: str, api_key: str = None) -> str: | |
| """ | |
| Identify the RFC 5646 language code of given text using Groq API. | |
| Args: | |
| text: The text to identify |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # from https://mirascope.com/docs/mirascope/guides/prompt-engineering/chaining-based/diverse | |
| # adapted for Groq by Claude (web version) | |
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "mirascope[groq]", | |
| # "pydantic>=2.0", | |
| # ] | |
| # /// |
OlderNewer