PHP Classes

File: src/Models/OllamaModels.php

Recommend this page to a friend!
  Classes of Mateo   Ollama Artificial Intelligence PHP Telegram Bot   src/Models/OllamaModels.php   Download  
File: src/Models/OllamaModels.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Ollama Artificial Intelligence PHP Telegram Bot
Telegram bot to interact with Ollama AI models
Author: By
Last change:
Date: 4 months ago
Size: 293 bytes
 

Contents

Class file image Download
<?php

namespace Mateodioev\OllamaBot\Models;

enum OllamaModels: int
{
    case
codellama = 1;
    case
codellamaCustom = 2;
    case
llama2 = 3;

    public static function try(
int $id): OllamaModels
   
{
        return
OllamaModels::tryFrom($id) ?? OllamaModels::codellamaCustom;
    }
}