Skip to content

Instantly share code, notes, and snippets.

View monk1337's full-sized avatar
🌱
It's a long hard fight / But I'll always live for tomorrow.

Monk (looking for PhD Fall’24) monk1337

🌱
It's a long hard fight / But I'll always live for tomorrow.
View GitHub Profile
A patient with fever and chill and severe coughing with cold. He has fever since 7 days and swelling at right foot. Already
he is diagnosed with diabetes malattie. He is on tablet meclizidam 500 and insulin 12 unit since last 1 year. Now his reports
are showing that he is malaria positive with right foot cellulitis. He is on tablet zoseph cv, tablet lumerex 4 bd for 3 days,
tablet paracetamol 500 for 3 days, capsule pandi twice bd, daily dressing with glycerin and kmn 4, daily hgt checking twice
a day and giving dose of insulin as per scale.
from typing import Dict, List, Optional, Tuple, Union
import openai
import json
import tiktoken
from promptify.parser.parser import Parser
from promptify.models.nlp.text2text.base_model import Model
class OpenAI(Model):
from typing import Dict, List, Optional, Tuple, Union
import openai
import json
import tiktoken
from promptify.parser.parser import Parser
from promptify.models.nlp.text2text.base_model import Model
class OpenAI(Model):
import os
import glob
from typing import List, Dict, Any, Optional
from jinja2 import Environment, FileSystemLoader, meta
class Prompter:
def __init__(
self,
model,
from abc import ABCMeta, abstractmethod
from typing import List, Optional, Union, Dict
import tenacity
class Model(metaclass=ABCMeta):
name = ""
description = ""
def __init__(
from abc import ABCMeta, abstractmethod
from typing import List, Optional, Union, Dict
import tenacity
class Model(metaclass=ABCMeta):
name = ""
description = ""
def __init__(
from typing import Dict, List, Optional, Tuple, Union
import openai
import tiktoken
class OpenAI_Complete(Model):
name = "OpenAI"
description = "OpenAI API for text completion using various models"
def __init__(
import unittest
from unittest.mock import MagicMock
class TestModel(unittest.TestCase):
def test_init(self):
model = MockModel("api_key", "mock_model")
self.assertEqual(model.api_key, "api_key")
self.assertEqual(model.model, "mock_model")
def test_supported_models(self):
from typing import List
from basemodel import Model
class MockModel(Model):
@classmethod
def supported_models(cls) -> List[str]:
return ["mock_model"]
def _verify_model(self):
from abc import ABCMeta, abstractmethod
from typing import List, Optional, Union, Dict
import openai
import tenacity
class Model(metaclass=ABCMeta):
name = ""
description = ""