@@ -42,20 +42,20 @@ Now make sure you change the reference of the key file in the config file (where
42
42
vim service/python/server.py
43
43
```
44
44
45
- ``` Python
46
- # TODO : Update this section with your tenancy details
47
- compartment_id = " ocid1.compartment.oc1.."
48
- CONFIG_PROFILE = " DEFAULT"
49
- config = oci.config.from_file(" ~/.oci/config" , CONFIG_PROFILE )
50
- endpoint = " https://inference.generativeai.<REGION>.oci.oraclecloud.com"
51
- generative_ai_inference_client = (
52
- oci.generative_ai_inference.GenerativeAiInferenceClient(
53
- config = config,
54
- service_endpoint = endpoint,
55
- retry_strategy = oci.retry.NoneRetryStrategy(),
56
- timeout = (10 , 240 ),
45
+ ```Python
46
+ #TODO: Update this section with your tenancy details
47
+ compartment_id = "ocid1.compartment.oc1.."
48
+ CONFIG_PROFILE = "DEFAULT"
49
+ config = oci.config.from_file("~/.oci/config", CONFIG_PROFILE)
50
+ endpoint = "https://inference.generativeai.<REGION>.oci.oraclecloud.com"
51
+ generative_ai_inference_client = (
52
+ oci.generative_ai_inference.GenerativeAiInferenceClient(
53
+ config=config,
54
+ service_endpoint=endpoint,
55
+ retry_strategy=oci.retry.NoneRetryStrategy(),
56
+ timeout=(10, 240),
57
+ )
57
58
)
58
- )
59
59
```
60
60
61
61
### 1. (Optional) Modify websocket ports
@@ -66,20 +66,20 @@ generative_ai_inference_client = (
66
66
vim app/web/components/content/index.tsx
67
67
```
68
68
69
- ``` preact
70
- const gateway = ws://${window.location.hostname}:1234;
71
- ```
69
+ ```js
70
+ const gateway = ws://${window.location.hostname}:1234;
71
+ ```
72
72
73
73
- Update default port in Python websocket server:
74
74
75
75
``` console
76
76
vim service/python/server.py
77
77
```
78
78
79
- ``` Python
80
- async def start_server ():
81
- await websockets.serve(handle_websocket, " localhost" , 1234 )
82
- ```
79
+ ```Python
80
+ async def start_server():
81
+ await websockets.serve(handle_websocket, "localhost", 1234 )
82
+ ```
83
83
84
84
### 2. Upload Public Key
85
85
0 commit comments