Skip to content

Commit

Permalink
adding config template
Browse files Browse the repository at this point in the history
  • Loading branch information
WSPluta committed Nov 11, 2024
1 parent b444c46 commit 55ce311
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions service/python/config.json.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compartment_id": "<your_compartment_id>",
"config_profile": "<your_config_profile>",
"service_endpoint": "https://inference.generativeai.us-chicago-1.oci.oraclecloud.com",
"model_type": "<cohere|llama>",
"cohere_model_id": "<your_cohere_model_id>",
"llama_model_id": "<your_llama_model_id>"
}
4 changes: 2 additions & 2 deletions service/python/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
with open('config.json') as f:
config = json.load(f)

# Load configuration parameters
# Load configuration parameters
compartment_id = config['compartment_id']
CONFIG_PROFILE = config['config_profile']
endpoint = config['service_endpoint']
Expand Down Expand Up @@ -172,6 +172,6 @@ async def handle_websocket(websocket, path):

async def start_server():
async with websockets.serve(handle_websocket, "localhost", 1986, max_size=200000000):
await asyncio.Future() # run forever
await asyncio.Future()

asyncio.run(start_server())

0 comments on commit 55ce311

Please sign in to comment.