micr0-dev / lexido

A terminal assistant, powered by Generative AI
GNU Affero General Public License v3.0
218 stars 8 forks source link

Add Custom REST api LLMs support #56

Closed micr0-dev closed 4 months ago

micr0-dev commented 4 months ago

Allows for completely custom LLM support via REST API

Example config:

{
    "api_config": {
      "url": "https://api.example.com/v1/chat/completions", // Replace with your API endpoint
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "Bearer 123124534545634", // Replace with your API key
        "Accept": "application/json"
      },
      "data_template": {
        "model": "example-model",
        "messages": "<PROMPT>" // This is where the prompt will be inserted
      }
    }
  }

Can easily add support for ChatGPT, Claude, etc.