Skip to content

Latest commit

 

History

History
119 lines (92 loc) · 2.54 KB

configuration.md

File metadata and controls

119 lines (92 loc) · 2.54 KB

The structure of mynth app configuration

App configuration

Providers configuration

type ProviderConfig = {
  /*
    The id of the provider.
    This one is autogenrated by the app.
  */
  id: string; // Autogenerated by the app

  /*
    The name of the provider.
    Will be set by user. For example: "Hyperbolic" or "OpenAI"
    */
  name: string;

  /*
    The type of the provider.
    Will define if this is local or API.
    */
  type: "local" | "api";

  /*
    The base url of the provider.
  */
  baseUrl: string;

  /*
    The api key of the provider.
  */
  apiKey: string;

  /*
    Models configuration
  */
  model: ModelConfig[];
};

Model configuration

type ModelConfig = {
  /*
    The id of the model.
    This one is autogenrated by the app.

    We allow to have same model defined twice,
    we don't want to limitate users in any way
    in terms of configuration.
  */
  id: string; // Autogenerated by the app

  /*
    The id of the model in the provider.

    This id, will be model ID used by the provider.
    For example: "llama3:8b"

    This will be used in requests to API, as well
    as recgnizing the model by the app for common
    models information.
  */
  modelId: string;

  /*
    The name of the model.

    This name, will be used by the app to display the model.
    For example: "LLama 3.1 8B"

    This will be set by user, but can be suggested by the app,
    as well as plugins will have it set automatically.
  */
  name: string;

  /*
    The type of the model.
  */
  type: "TEXT_GENERATION" | "TEXT_TO_IMAGE" | "IMAGE_TO_TEXT";
};
type ChatConfig = {
  /*
    The id of the chat.
  */
  id: string; // Autogenerated by the app

  /*
    The name of the chat. Display name.
  */
  name: string;

  /*
    The model of the chat.
  */
  models: [`${ProviderId}:${ModelId}}`];
};

When user opens a new tab, we show the new tab page with:

  • Possibility to start new chat (textarea autofocused, like new chat page, for quick chatting experience)
  • Button to start image generation chat
  • Recent chat's history to quickly open recent chat

When it comes to chat configuration, we show all the options using current default chat configuration.

Current model and base prompt will be edited in settings page.

By default 1st model added will be default, and then users can change it in settings page. As well as base/system prompt.

Future: We can allow creating predefined chat configurations, that will be shown in new tab page, and can be quickly used for different tasks and models configs / user needs.