Add OAI response API

This commit is contained in:
kwaroran
2025-03-20 12:08:34 +09:00
parent fff4ec74af
commit ad4f52239b
6 changed files with 226 additions and 1 deletions

29
t.py Normal file
View File

@@ -0,0 +1,29 @@
En2De = {
"hello": "Hallo",
"world": "Welt",
"python": "Python",
"is": "ist",
"a": "ein",
"programming": "Programmier",
"language": "Sprache",
"that": "das",
"lets": "lässt",
"you": "dich",
"work": "arbeiten",
"quickly": "schnell",
"and": "und",
"integrate": "integrieren",
"systems": "Systeme",
"more": "mehr",
"effectively": "effektiv",
}
def translate(text):
return " ".join(En2De.get(word, word) for word in text.split())
if __name__ == "__main__":
text = "hello world python is a programming language that lets you work quickly and integrate systems more effectively"
print(translate(text))