Add translate_text.py example for translating text to French

This commit is contained in:
2024-10-29 07:14:51 -04:00
parent 6319eb2a22
commit 92d8a38e10
+9
View File
@@ -0,0 +1,9 @@
from _context import sm
conversation = sm.create_conversation(llm_model="gpt-4o", llm_provider="openai")
conversation.add_message(
"user", "Translate the following text to French: 'Hello, world!'"
)
print(conversation.send().text)