mirror of
https://github.com/kennethreitz/simplemind.git
synced 2026-06-05 14:50:16 +00:00
Add translate_text.py example for translating text to French
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user