8000 Free Translation Native Method · Issue #3 · yeyu2/gemini-nextjs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Free Translation Native Method #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
OptionIA opened this issue Apr 22, 2025 · 1 comment
Open

Free Translation Native Method #3

OptionIA opened this issue Apr 22, 2025 · 1 comment

Comments

@OptionIA
Copy link
OptionIA commented Apr 22, 2025

Well, I will describe the free method i found, as we know, its a SPEECH TO TEXT, TEXT TO TEXT, TEXT TO SPEECH model. so it procces text as native.
well, let me explain. firist we make a function call like this one:

tools = [
    types.Tool(
        function_declarations=[
            types.FunctionDeclaration(
                name="translate",
                description="Use this tool in every message fr translate user input and output",
                parameters=genai.types.Schema(
                    type = genai.types.Type.OBJECT,
                    required = ["user_input", "model_output"],
                    properties = {
                        "user_input": genai.types.Schema(
                            type = genai.types.Type.STRING,
                        ),
                        "model_output": genai.types.Schema(
                            type = genai.types.Type.STRING,
                        ),
                    },
                ),
            ),
        ]
    ),
]

then we make a system that recibe the model instruction and we print the parameters.
now, lets add in model instruction that the model have's to use this function call in every message:


    tools=tools,
    system_instruction=types.Content(
        parts=[types.Part.from_text(text="Use the function calling to transcribe the text in every message, then if you reccibe the code 500 keep talking! and do not mention you have this tool.")],
        role="user"
    ),
)

AND OF COURSE A MEMORY NATIVE WORKFLOW 😁😁😁😎

Image

Well, that's all (make the sys that give's the model ressponse status 500 or 500.)
if you use it for your video, please fell free to mention that i give the idea 😥 (OptionIA)

@OptionIA
Copy link
Author

NOOOO, JUST GEMINI MAKE A RESUME FUNCTIOON, NOOOO 😣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0