ciyidogan commited on
Commit
9f7c9e9
·
verified ·
1 Parent(s): 52e5f9a

Update config_provider.py

Browse files
Files changed (1) hide show
  1. config_provider.py +12 -9
config_provider.py CHANGED
@@ -279,7 +279,7 @@ class ConfigProvider:
279
  **project_data
280
  )
281
 
282
- # Create initial version
283
  initial_version = VersionConfig(
284
  no=1,
285
  caption="Initial version",
@@ -290,18 +290,21 @@ class ConfigProvider:
290
  welcome_prompt=None,
291
  llm=LLMConfiguration(
292
  repo_id="ytu-ce-cosmos/Turkish-Llama-8b-Instruct-v0.1",
293
- generation_config={
294
- "max_new_tokens": 256,
295
- "temperature": 0.7,
296
- "top_p": 0.9,
297
- "repetition_penalty": 1.1
298
- },
 
299
  use_fine_tune=False,
300
  fine_tune_zip=""
301
  ),
302
  intents=[],
303
  created_date=get_current_timestamp(),
304
- created_by=username
 
 
305
  )
306
 
307
  # Add initial version to project
@@ -330,7 +333,7 @@ class ConfigProvider:
330
  )
331
 
332
  return project
333
-
334
  @classmethod
335
  def update_project(cls, project_id: int, update_data: dict, username: str, expected_last_update: Optional[str] = None) -> ProjectConfig:
336
  """Update project with optimistic locking"""
 
279
  **project_data
280
  )
281
 
282
+ # Create initial version with proper models
283
  initial_version = VersionConfig(
284
  no=1,
285
  caption="Initial version",
 
290
  welcome_prompt=None,
291
  llm=LLMConfiguration(
292
  repo_id="ytu-ce-cosmos/Turkish-Llama-8b-Instruct-v0.1",
293
+ generation_config=GenerationConfig(
294
+ max_new_tokens=512,
295
+ temperature=0.7,
296
+ top_p=0.9,
297
+ repetition_penalty=1.1,
298
+ do_sample=True
299
+ ),
300
  use_fine_tune=False,
301
  fine_tune_zip=""
302
  ),
303
  intents=[],
304
  created_date=get_current_timestamp(),
305
+ created_by=username,
306
+ last_update_date=None,
307
+ last_update_user=None
308
  )
309
 
310
  # Add initial version to project
 
333
  )
334
 
335
  return project
336
+
337
  @classmethod
338
  def update_project(cls, project_id: int, update_data: dict, username: str, expected_last_update: Optional[str] = None) -> ProjectConfig:
339
  """Update project with optimistic locking"""