File size: 1,189 Bytes
5fc8c9d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# okto_version: "1.2"
PROJECT "DeployAPIExample"
DESCRIPTION "Demonstrates DEPLOY block for API deployment"

ENV {

  accelerator: "gpu"

  min_memory: "8GB"

  precision: "fp16"
}

DATASET {

  train: "examples/datasets/demo_train.jsonl"

  format: "jsonl"

  type: "chat"
}

MODEL {

  name: "api-deploy-model"

  base: "oktoseek/base-mini"

  device: "cuda"
}

TRAIN {

  epochs: 5

  batch_size: 32

  device: "cuda"
}

EXPORT {

  format: ["onnx", "okm"]

  path: "export/"
}

DEPLOY {

  target: "api"

  host: "0.0.0.0"

  endpoint: "/chatbot"

  requires_auth: true

  port: 9000

  max_concurrent_requests: 100

  protocol: "http"

  format: "onnx"
}

SECURITY {
  input_validation {

    max_length: 500

    disallow_patterns: [
      "<script>",
      "DROP TABLE",
      "rm -rf",
      "sudo"
    ]
  }
  
  output_validation {

    prevent_data_leak: true

    mask_personal_info: true
  }
  
  rate_limit {

    max_requests_per_minute: 60
  }
  
  encryption {

    algorithm: "AES-256"
  }
}

BEHAVIOR {

  mode: "chat"

  personality: "assistant"

  verbosity: "medium"

  language: "en"

  fallback: "How can I help you?"
}