Spaces:
Sleeping
Sleeping
from litellm import completion | |
import os | |
from dotenv import load_dotenv | |
import litellm | |
load_dotenv() | |
system_prompt = """ | |
You are ChatGPT, a large language model trained by OpenAI. | |
Carefully heed the user's instructions. | |
Respond using Markdown.you know turkish | |
sana verilen cumledeki hatalari gidericeksin | |
1 yerine ı, 0 yerine İ, _ yerine ş, yerine ğ, ^ yerine Ş yerleştirilecek | |
& ve \n işaretlerini değiştirme | |
g harfini değiştirme | |
""" | |
def update_text_with_ai(text: str): | |
response = completion("azure/gpt-4-0125-preview", messages = [{ "content": system_prompt,"role": "system"},{ "content": text,"role": "user"}]) | |
updated_text = response.choices[0].message.content | |
return updated_text | |