You can call this prompt from our Gemini API by integrating the following code into your project.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],[],[],[],null,["# Reverse dictionary\n\n[Prompt gallery](/prompt-gallery)\n\nReverse dictionary\n==================\n\nLook up a word by its definition \nPrompt type: [subject\nText](/prompt-gallery/?type=text) \nUse case: \nAnswer \nRelated: \n[Detailed reverse dictionary](/prompts/data-reverse-dictionary) [Sentiment analysis](/prompts/sentiment-analysis)\n[Open in Google AI Studio](https://makersuite.google.com/app/prompts/reverse-dictionary) \n\n#### Prompt text\n\nThis is a reverse dictionary, which takes a description of a concept and responds with the term most likely.\n\nDescription: A moment in a game where no one can win and you get caught in an endless loop.\nWord: Stalemate\n\nDescription: { {input} }\n\nWord:\n\n#### Sample responses\n\nInput input \nOutput \nA term that describes how different plants and animals can live together with one another in a regional area. \nEcosystem \n\nGet code\n--------\n\n[Enable API key](https://makersuite.google.com/app/apikey) to develop with the Gemini API\n\nYou can call this prompt from our Gemini API by integrating the following code into your project. \nPython \nJavascript \n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 \n\"\"\" At the command line, only need to run once to install the package via pip: $ pip install google-generativeai \"\"\" import google.generativeai as genai genai.configure(api_key=\"YOUR API KEY\") defaults = { 'model': 'models/text-bison-001', 'temperature': 0.2, 'candidate_count': 1, 'top_k': 40, 'top_p': 0.95, 'max_output_tokens': 1024, } prompt = \"\"\"This is a reverse dictionary, which takes a description of a concept and responds with the term most likely. Description: A moment in a game where no one can win and you get caught in an endless loop. Word: Stalemate Description: A term that describes how different plants and animals can live together with one another in a regional area. Word:\"\"\" response = genai.generate_text( \\*\\*defaults, prompt=prompt ) print(response.result) \n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 \nconst { TextServiceClient } = require(\"@google-ai/generativelanguage\"); const { GoogleAuth } = require(\"google-auth-library\"); const MODEL_NAME = \"models/text-bison-001\"; const API_KEY = \"YOUR API KEY\"; const client = new TextServiceClient({ authClient: new GoogleAuth().fromAPIKey(API_KEY), }); const promptString = \"This is a reverse dictionary, which takes a description of a concept and responds with the term most likely.nnDescription: A moment in a game where no one can win and you get caught in an endless loop.nWord: StalematennDescription: A term that describes how different plants and animals can live together with one another in a regional area.nWord:\"; client.generateText({ // required, which model to use to generate the result model: MODEL_NAME, // optional, 0.0 always uses the highest-probability result temperature: 0.2, // optional, how many candidate results to generate candidateCount: 1, // optional, number of most probable tokens to consider for generation top_k: 40, // optional, for nucleus sampling decoding strategy top_p: 0.95, // optional, maximum number of output tokens to generate max_output_tokens: 1024, prompt: { text: promptString, }, }).then(result =\\\u003e { console.log(JSON.stringify(result, null, 2)); }); \ncontent_copy done Copy to clipboard"]]