• Resolved johocen168

    (@johocen168)


    Hi there,

    First of all, I would like to thank you for creating this amazing plugin and training the chatbot well enough to demostrate the power of AI.

    Below is the answer from Nyao, I added the code and activated the Snippets, but still got the generated prompt and completion in English, why?

    Yes, you can use the Code Snippets plugin to add the custom PHP code for setting the language to Chinese in AI Engine. Here are the steps to do that:
    Install and activate the Code Snippets plugin on your WordPress site.
    Go to Snippets > Add New in your WordPress dashboard.
    Give your snippet a name, such as “Set AI Engine Language to Chinese”.
    Copy and paste the following code in the “Code” section:
    add_filter( ‘ai_engine_finetune_args’, function( $args ) {
    $args[‘language’] = ‘zh-TW’;
    return $args;
    } );
    Click on “Save Changes and Activate”
    That’s it! Now, whenever you use the Fine-tuned Model in AI Engine, it will automatically set the language to Chinese.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    Below is the answer from Nyao

    Oh wow, don’t believe Nyao! :p Also, the filter ai_engine_finetune_args don’t exist (Nyao made this up, it should probably push updates with new features when it has time haha)

    Have a look at this: https://meowapps.com/ai-engine/faq/#languages. There are various ways of achieving what you want, I believe ??

    Thread Starter johocen168

    (@johocen168)

    Hi @tigroumeow ,

    Surprised that Nyao will make up the filter ai_engine_finetune_args,

    So this answer from Nyao is also questionable, correct?

    Fine-tuned models can be used with any language, but they require training on data specific to that language. Embeddings, on the other hand, can be used with any language without requiring language-specific training. So, if you have a dataset in a specific language and want to create a chatbot for that language, you can fine-tune a model on that dataset to get more accurate results. However, if you want to create a chatbot that can handle multiple languages, embeddings may be a better choice as they can be used with any language without requiring language-specific training.

    I tried the code provided in faq, using the Code Snippets plugin, but nothing happened.

    add_filter( 'mwai_languages', function( $languages ) {
      unset($languages['en']); // Remove English
      $languages['zh'] = "Chinese"; // Add Chinese
      return $languages;
    }, 10, 1);

    How can I Set AI Engine Language to Chinese for Fine-tuned models?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set AI Engine Language to Chinese for Fine-tuned models’ is closed to new replies.