You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all I must say that I LOVE this project very much, having my personal AI chatbot has always been my dream, and this project is a big part of that! So Thank You for that!!
I translated into French "ltm_config.json" and I see that there is only one problem: it is the text of "{time_difference}" it's "0 days ago" for exemple, so, in French, it's must be "il y a 0 jours"
It's not really a big problem since it's only time, but allowing it to be translated would be a good thing I think!
The text was updated successfully, but these errors were encountered:
This is a good point, one way of addressing this is to add a custom config option that allows you to format how you word "X days ago". I'll think through this.
And i modify the code of /utils/timestamp_parsing.py for
"""Timestamp parsing utils."""
import math
from datetime import datetime
from deep_translator import GoogleTranslator
def get_time_difference_message(past_timestamp: str) -> str:
"""Converts a timestamp from the past to a "X days ago" format."""
datetime_format = "%Y-%m-%d %H:%M:%S"
past = datetime.strptime(past_timestamp, datetime_format)
now = datetime.utcnow()
delta = now - past
days = math.floor(delta.days)
message = f"{days} days ago"
translated_message = GoogleTranslator(source='en', target='fr').translate(message)
return translated_message
Hi!
First of all I must say that I LOVE this project very much, having my personal AI chatbot has always been my dream, and this project is a big part of that! So Thank You for that!!
I translated into French "ltm_config.json" and I see that there is only one problem: it is the text of "{time_difference}" it's "0 days ago" for exemple, so, in French, it's must be "il y a 0 jours"
It's not really a big problem since it's only time, but allowing it to be translated would be a good thing I think!
The text was updated successfully, but these errors were encountered: