Skip to Content
Mika Scraper 1.1.1 is released ๐ŸŽ‰
๐Ÿฉ MIKA TYPE ALIASType Alias: GalaxyModule

Type Alias: GalaxyModule

GalaxyModule = "SUMMARIZE" | "PARAPHRASE" | "EXPAND" | "TONE" | "TRANSLATE" | "REPLY" | "GRAMMAR"

Defined in: src/_other-scraper/galaxyai.ts:9

This type alias defines the allowed operations for the GalaxyAI module, specifying a set of string literals that represent various text manipulation functionalities. Each value corresponds to a specific type of text processing that can be performed by the module.

Usage

The GalaxyModule type is essential for ensuring that only valid operations are used within the context of the GalaxyAI module, thereby promoting type safety and reducing runtime errors.

Allowed Operations

  • SUMMARIZE: Generates a concise summary of the given text.
  • PARAPHRASE: Rewrites the input text with different wording while retaining the original meaning.
  • EXPAND: Elaborates on the text, providing additional details and context.
  • TONE: Adjusts the tone of the text, such as making it more formal or casual.
  • TRANSLATE: Translates the input text into a specified language.
  • REPLY: Creates a response based on the input text, useful for chat and conversation simulations.
  • GRAMMAR: Checks and corrects grammatical errors in the text.

Example

Here is an example demonstrating how to use the GalaxyModule type in a function that processes text:

function processText(operation: GalaxyModule, text: string): string { switch (operation) { case "SUMMARIZE": return summarizeText(text); case "PARAPHRASE": return paraphraseText(text); case "EXPAND": return expandText(text); case "TONE": return adjustTone(text); case "TRANSLATE": return translateText(text); case "REPLY": return generateReply(text); case "GRAMMAR": return checkGrammar(text); default: throw new Error(`Unsupported operation: ${operation}`); } }
Last updated on