Skip to content

Commit

Permalink
test(LAB-3307): add test_e2e_llm_static (create and import conversa…
Browse files Browse the repository at this point in the history
…tions e2e test)
  • Loading branch information
paulruelle committed Jan 14, 2025
1 parent e392610 commit d3a7293
Show file tree
Hide file tree
Showing 3 changed files with 367 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/kili/llm/services/export/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class LLMExporter:
def __init__(self, kili_api_gateway: KiliAPIGateway):
self.kili_api_gateway = kili_api_gateway

def export(self, assets: List[Dict], json_interface: Dict) -> List[Dict]:
def export(self, assets: List[Dict], json_interface: Dict) -> List[Conversation]:
export_result = [
self.format_asset(asset, json_interface) for asset in assets if asset.get("labels")
]
Expand All @@ -60,7 +60,7 @@ def format_asset(self, asset: Dict, json_interface: Dict) -> Conversation:
{
"id": chat_item["id"],
"content": chat_item.get("content"),
"externalId": chat_item.get("externalId"),
"externalId": chat_item.get("externalId") or chat_item["id"],
"modelName": chat_item.get("modelName") or chat_item.get("modelId"),
"role": chat_item.get("role"),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
from kili.domain.llm import ChatItemRole
from kili.exceptions import GraphQLError

PROJECT_TITLE = "[E2E Test]: Model"
PROJECT_DESCRIPTION = "End-to-End Test Model and Project Model workflow"
MODEL_NAME = "E2E Test Model"
UPDATED_MODEL_NAME = "E2E Test Model Updated"
PROJECT_TITLE = "[E2E Test]: LLM Dynamic"
PROJECT_DESCRIPTION = "End-to-End Test LLM Dynamic and Project Model workflow"
MODEL_NAME = "E2E LLM Dynamic Raw"
UPDATED_MODEL_NAME = "E2E LLM Dynamic"
PROMPT = "Hello, world !"
SYSTEM_PROMPT = "You're an helpful AI assistant with cutsom instructions"
SYSTEM_PROMPT = "You're an helpful AI assistant with custom instructions"

INTERFACE = {
"jobs": {
Expand Down
Loading

0 comments on commit d3a7293

Please sign in to comment.