from llama_cpp import Llama def die(type): llm = Llama(model_path="./DeepSeek-Coder-V2-Lite-Instruct-Q5_K_S.gguf") responses = llm( f"""I am a {type} person Create a diet plan to lose weight for a month i Want in the format : Week 1:\n - Breakfast:\n - Lunch:\n - Dinner:\n Week 2:\n - Breakfast:\n - Lunch:\n - Dinner:\n Week 3:\n - Breakfast:\n - Lunch:\n - Dinner:\n Week 4: - Breakfast:\n - Lunch:\n - Dinner:\n """, max_tokens=1000, temperature=0.7, top_p=0.95, top_k=40 ) return responses['choices'][0]['text'] def di(type): llm = Llama(model_path="./DeepSeek-Coder-V2-Lite-Instruct-Q5_K_S.gguf") responses = llm( f""" I am a person Create a diet plan to {di} for a month i Want in the format : Week 1:\n - Breakfast:\n - Lunch:\n - Dinner:\n Week 2:\n - Breakfast:\n - Lunch:\n - Dinner:\n Week 3:\n - Breakfast:\n - Lunch:\n - Dinner:\n Week 4: - Breakfast:\n - Lunch:\n - Dinner:\n """, max_tokens=600, temperature=0.7, top_p=0.95, top_k=40 ) return responses['choices'][0]['text'] def chats(type): llm = Llama(model_path="./metamath-13b-v10Q4_K_M.gguf") responses = llm( type, max_tokens=100, # Increased token limit to ensure full plan generation temperature=0.6, # Lower temperature for more deterministic output top_p=0.8, # Adjusted for balance between speed and quality top_k=50 ) return responses['choices'][0]['text']