Spaces:
Building
Building
Update llm_startup.py
Browse files- llm_startup.py +3 -3
llm_startup.py
CHANGED
@@ -15,7 +15,7 @@ from llm_factory import LLMFactory
|
|
15 |
def _select_live_version(p: ProjectConfig) -> VersionConfig | None:
|
16 |
"""Yayınlanmış en güncel versiyonu getir."""
|
17 |
published = [v for v in p.versions if v.published]
|
18 |
-
return max(published, key=lambda v: v.
|
19 |
|
20 |
async def notify_startup_async():
|
21 |
"""Notify LLM provider about project startups (async version)"""
|
@@ -51,10 +51,10 @@ async def notify_startup_async():
|
|
51 |
log(f"⚠️ No published version found for project '{project.name}', skipping startup")
|
52 |
continue
|
53 |
|
54 |
-
# Build project config
|
55 |
project_config = {
|
56 |
"name": project.name,
|
57 |
-
"
|
58 |
"repo_id": version.llm.repo_id,
|
59 |
"generation_config": version.llm.generation_config,
|
60 |
"use_fine_tune": version.llm.use_fine_tune,
|
|
|
15 |
def _select_live_version(p: ProjectConfig) -> VersionConfig | None:
|
16 |
"""Yayınlanmış en güncel versiyonu getir."""
|
17 |
published = [v for v in p.versions if v.published]
|
18 |
+
return max(published, key=lambda v: v.no) if published else None
|
19 |
|
20 |
async def notify_startup_async():
|
21 |
"""Notify LLM provider about project startups (async version)"""
|
|
|
51 |
log(f"⚠️ No published version found for project '{project.name}', skipping startup")
|
52 |
continue
|
53 |
|
54 |
+
# Build project config - version.id yerine version.no kullan
|
55 |
project_config = {
|
56 |
"name": project.name,
|
57 |
+
"version_no": version.no, # version_id yerine version_no
|
58 |
"repo_id": version.llm.repo_id,
|
59 |
"generation_config": version.llm.generation_config,
|
60 |
"use_fine_tune": version.llm.use_fine_tune,
|