Skip to content

Commit

Permalink
Merge pull request #352 from dcSpark/nico/add_ws_port_to_conf
Browse files Browse the repository at this point in the history
Add WS Port to conf
  • Loading branch information
nicarq authored Jun 28, 2024
2 parents 6369516 + 0c85060 commit 8c2dede
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ impl ShinkaiNodeProcessHandler {
let initial_agent_models = format!("ollama:{}", initial_model);
let options = ShinkaiNodeOptions {
port: Some("9550".to_string()),
ws_port: Some("9551".to_string()),
node_storage_path: Some(default_node_storage_path),
unstructured_server_url: Some("https://public.shinkai.com/x-un".to_string()),
embeddings_server_url: Some("http://127.0.0.1:11435".to_string()),
Expand Down Expand Up @@ -110,6 +111,7 @@ impl ShinkaiNodeProcessHandler {
let base_options = self.options.clone();
let merged_options = ShinkaiNodeOptions {
port: Some(options.port.unwrap_or_else(|| base_options.port.unwrap())),
ws_port: Some(options.ws_port.unwrap_or_else(|| base_options.ws_port.unwrap())),
node_storage_path: Some(
options
.node_storage_path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone)]
pub struct ShinkaiNodeOptions {
pub port: Option<String>,
pub ws_port: Option<String>,
pub node_storage_path: Option<String>,
pub unstructured_server_url: Option<String>,
pub embeddings_server_url: Option<String>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export type ShinkaiNodeManagerEventMap =

export type ShinkaiNodeOptions = {
port?: number;
ws_port?: number;
unstructured_server_url?: string;
embeddings_server_url?: string;
first_device_needs_registration_code?: string;
Expand Down

0 comments on commit 8c2dede

Please sign in to comment.