use groq for kimi
Browse files212 unmodified lines213214215216217218219220221222223753 unmodified lines977978979980981982212 unmodified lines# HF Inference ClientHF_TOKEN = os.getenv('HF_TOKEN')client = InferenceClient(provider="auto",api_key=HF_TOKEN,bill_to="huggingface")# Type definitionsHistory = List[Tuple[str, str]]753 unmodified lines# Enhance query with search if enabledenhanced_query = enhance_query_with_search(query, enable_search)if image is not None:messages.append(create_multimodal_message(enhanced_query, image))else:212 unmodified lines213214215216217218219220221222223224225226227753 unmodified lines981982983984985986987988989212 unmodified lines# HF Inference ClientHF_TOKEN = os.getenv('HF_TOKEN')def get_inference_client(model_id):"""Return an InferenceClient with provider based on model_id."""provider = "groq" if model_id == "moonshotai/Kimi-K2-Instruct" else "auto"return InferenceClient(provider=provider,api_key=HF_TOKEN,bill_to="huggingface")# Type definitionsHistory = List[Tuple[str, str]]753 unmodified lines# Enhance query with search if enabledenhanced_query = enhance_query_with_search(query, enable_search)# Use dynamic client based on selected modelclient = get_inference_client(_current_model["id"])if image is not None:messages.append(create_multimodal_message(enhanced_query, image))else:
app.py+12-5