StefMa / Aictionary

The world's first dictionary that is based on AI
MIT License
0 stars 0 forks source link

Implement basic usage: Does word exist in language X #1

Open StefMa opened 1 year ago

StefMa commented 1 year ago
/api/exist/{language}/{word} 

Endpoint: https://platform.openai.com/docs/api-reference/completions/create

Prompt:

Does the following word exist in the {lang} dictionary: {word}. Answer only with true if its included or false if it's not included, in lowercase. I don't want to see explanations. 

Response:

{ 
  word: {word} 
  lang: {lang} 
  exist: true/false
} 
StefMa commented 2 weeks ago

The following prompt might work:

Does the following word exist in any language you know? Please answer in the following json format. { exist: boolean, lang: ISO_CODE_Lang, word: String //the original word } Dot not any other explanation to the output. Just this json and stop! No additional token output. Here is the word: {Word}