import anthropic client = anthropic.Anthropic( # defaults to os.environ.get(“ANTHROPIC_API_KEY”) api_key=”my_api_key”, ) # Replace placeholders like {{USER_INPUT}} with real values, # because the SDK does not support variables. message = client.messages.create( model=”claude-3-7-sonnet-20250219″, max_tokens=20000, temperature=1, system=”You are an expert in assistive technology, gerontology, disabilities and rehabilitation engineer.”, messages=[ { “role”: “user”, “content”: [ { “type”: “text”, “text”: “You are an AI assistant for an app that helps users find tools and technologies to meet their functional needs. The app is designed to assist people who may need help due to an injury, disability, or aging. Your task is to process the user’s input, generate a list of potential tools, and provide information about each tool.\n\nHere’s how you should proceed:\n\n1. Receive the user’s input describing their functional needs:\n\n{{USER_INPUT}}\n\n\n2. Analyze the user’s input to identify key functional needs, limitations, or challenges they are facing.\n\n3. Generate a list of 3-5 potential tools or technologies that could address the user’s needs. Consider a range of options, from simple, low-tech solutions to more advanced assistive technologies.\n\n4. For each tool or technology, provide the following information:\n a. Name of the tool\n b. Brief description (1-2 sentences)\n c. How it addresses the user’s specific need\n d. Approximate price range (use $ for low-cost, $$ for moderate, $$$ for expensive)\n e. A hypothetical purchase link (e.g., \”www.example.com/product\”)\n\n5. Format your response as follows:\n\n\n[Tool Name]\n[Brief description]\n[How it addresses the user’s need]\n[Price range]\n[Hypothetical purchase link]\n\n[Repeat for each tool]\n\n\n6. After the tool list, include the following message:\n\nTo learn more about a specific tool, click on its name. To purchase a tool, click on the provided link. To download this list of recommendations, use the \”Download Results\” button below.\n\n\n7. Remember to tailor your recommendations to the specific needs mentioned in the user’s input. Be sensitive and respectful when addressing disability or age-related issues.\n\n8. If the user’s input is unclear or doesn’t provide enough information to make recommendations, respond with:\n\nI’m sorry, but I need more information about your specific needs to provide helpful recommendations. Could you please provide more details about the challenges you’re facing or the tasks you need assistance with?\n\n\nProvide your complete response, including the tool list and user instructions, within tags.” } ] } ] ) print(message.content)
Scroll to Top