import requestsimport jsonfrom huggingface_hub import hf_hub_download url = "http://<your-server-url>:8000/v1/chat/completions"headers = {"Content-Type": "application/json", "Authorization": "Bearer token"} model = "apolloparty/Devstral-Small-2507-NVFP4A16" def load_system_prompt(repo_id: str, filename: str) -> str: file_path = hf_hub_download(repo_id=repo_id, filename=filename) with open(file_path, "r") as file: system_prompt = file.read() return system_prompt SYSTEM_PROMPT = load_system_prompt(model, "SYSTEM_PROMPT.txt") messages = [ {"role": "system", "content": SYSTEM_PROMPT}, { "role": "user", "content": [ { "type": "text", "text": "<your-command>", }, ], },] data = {"model": model, "messages": messages, "temperature": 0.15} # Devstral Small 1.1 supports tool calling. If you want to use tools, follow this:# tools = [ # Define tools for vLLM# {# "type": "function",# "function": {# "name": "git_clone",# "description": "Clone a git repository",# "parameters": {# "type": "object",# "properties": {# "url": {# "type": "string",# "description": "The url of the git repository",# },# },# "required": ["url"],# },# },# }# ] # data = {"model": model, "messages": messages, "temperature": 0.15, "tools": tools} # Pass tools to payload. response = requests.post(url, headers=headers, data=json.dumps(data))print(response.json()["choices"][0]["message"]["content"])