Google Translate

function

Uses Google translation API to translate from a user's native language to the LLM's native language, and back again to the user's.

justinrahb
@justinrahb
·
2 years ago
4.5K
3
7.9K
Updated 2 years ago
Created Jun 28, 2024
google_translate.py
Python · 177 lines
"""
title: Google Translate Filter
author: justinh-rahb and OriginalSimon
author_url: https://github.com/justinh-rahb
funding_url: https://github.com/open-webui
version: 0.1.5
license: MIT
"""

import re
from typing import List, Optional
from pydantic import BaseModel

Uses Google translation API to translate from a user's native language to the LLM's native language, and back again to the user's.


1