First take on a rag tool

This commit is contained in:
Gui Vieira
2024-02-13 20:10:56 -03:00
parent 54e4554f49
commit c1182eb322
22 changed files with 454 additions and 0 deletions

21
tests/conftest.py Normal file
View File

@@ -0,0 +1,21 @@
from typing import Callable
import pytest
class Helpers:
@staticmethod
def get_embedding_function() -> Callable:
def _func(input):
assert input == ["What are the requirements for the task?"]
with open("tests/data/embedding.txt", "r") as file:
content = file.read()
numbers = content.split(",")
return [[float(number) for number in numbers]]
return _func
@pytest.fixture
def helpers():
return Helpers