Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into feature/vf-mounts-prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
acedward committed Jan 14, 2025
2 parents 8e83e8c + 1441c62 commit 0535562
Show file tree
Hide file tree
Showing 33 changed files with 698 additions and 155 deletions.
19 changes: 19 additions & 0 deletions .github/binary.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:24.10 AS downloader
RUN apt-get update && apt-get install -y curl unzip
ARG SHINKAI_NODE_VERSION
RUN curl -L -o shinkai-node.zip https://download.shinkai.com/shinkai-node/binaries/production/x86_64-unknown-linux-gnu/${SHINKAI_NODE_VERSION:-latest}.zip
RUN FILE_SIZE=$(stat -c %s /shinkai-node.zip) && \
if [ $FILE_SIZE -lt 26214400 ]; then \
echo "Error: shinkai-node file is less than 25MB" && \
exit 1; \
fi
RUN unzip -o shinkai-node.zip -d ./node
RUN chmod +x /node/shinkai-node

FROM ubuntu:24.10 AS runner
RUN apt-get update && apt-get install -y openssl ca-certificates
WORKDIR /app
COPY --from=downloader /node ./

EXPOSE 9550
ENTRYPOINT ["/bin/sh", "-c", "/app/shinkai-node"]
42 changes: 27 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.9.4"
version = "0.9.5"
edition = "2021"
authors = ["Nico Arqueros <[email protected]>"]

Expand Down
10 changes: 7 additions & 3 deletions scripts/run_all_localhost.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

export NODE_IP="0.0.0.0"
export NODE_PORT="9552"
export NODE_API_IP="0.0.0.0"
export NODE_IP="0.0.0.0"
export NODE_API_PORT="9550"
export NODE_WS_PORT="9551"
export NODE_PORT="9552"
export NODE_HTTPS_PORT="9553"
export IDENTITY_SECRET_KEY="df3f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81119"
export ENCRYPTION_SECRET_KEY="d83f619804a92fdb4057192dc43dd748ea778adc52bc498ce80524c014b81159"
export PING_INTERVAL_SECS="0"
Expand All @@ -14,9 +16,11 @@ export STARTING_NUM_QR_DEVICES="1"
export FIRST_DEVICE_NEEDS_REGISTRATION_CODE="false"
export LOG_SIMPLE="true"
export NO_SECRET_FILE="true"
export EMBEDDINGS_SERVER_URL="http://localhost:9081/"
export EMBEDDINGS_SERVER_URL="http://localhost:11434/"
export PROXY_IDENTITY="@@relayer_pub_01.arb-sep-shinkai"
export SHINKAI_TOOLS_RUNNER_DENO_BINARY_PATH="${workspaceFolder}/shinkai-bin/shinkai-node/shinkai-tools-runner-resources/deno"
export SHINKAI_TOOLS_RUNNER_UV_BINARY_PATH="${workspaceFolder}/shinkai-bin/shinkai-node/shinkai-tools-runner-resources/uv"
export SHINKAI_TOOLS_DIRECTORY_URL="https://download.shinkai.com/tools/directory.json"

export INITIAL_AGENT_NAMES="o_mixtral"
export INITIAL_AGENT_URLS="http://localhost:11434"
Expand Down
1 change: 1 addition & 0 deletions scripts/run_local_ai_with_proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ export LOG_ALL="1"
export DEBUG_VRKAI="1"
# export PROXY_IDENTITY="@@kao_tcp_relayer.arb-sep-shinkai"
export PROXY_IDENTITY="@@relayer_pub_01.arb-sep-shinkai"
export SHINKAI_TOOLS_DIRECTORY_URL="https://download.shinkai.com/tools/directory.json"

cargo run --bin shinkai_node --package shinkai_node
1 change: 1 addition & 0 deletions scripts/run_node_localhost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export FIRST_DEVICE_NEEDS_REGISTRATION_CODE="false"
export LOG_SIMPLE="true"
export EMBEDDINGS_SERVER_URL="http://localhost:11434" # assumes that you installed the embeddings server locally using ollama (shinkai-apps helps you handling all of this)
# export EMBEDDINGS_SERVER_URL="https://public.shinkai.com/x-em" # if you prefer to use the public embeddings server
export SHINKAI_TOOLS_DIRECTORY_URL="https://download.shinkai.com/tools/directory.json"

# Add these lines to enable all log options
export LOG_ALL=1
Expand Down
4 changes: 3 additions & 1 deletion shinkai-bin/shinkai-node/src/cron_tasks/cron_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use shinkai_message_primitives::{
shinkai_name::ShinkaiName,
ws_types::WSUpdateHandler,
},
shinkai_message::shinkai_message_schemas::JobMessage,
shinkai_message::shinkai_message_schemas::{AssociatedUI, JobMessage},
shinkai_utils::{
shinkai_logging::{shinkai_log, ShinkaiLogLevel, ShinkaiLogOption},
signatures::clone_signature_secret_key,
Expand Down Expand Up @@ -331,6 +331,8 @@ impl CronManager {
if job_creation_info_clone.is_hidden.is_none() {
job_creation_info_clone.is_hidden = Some(true);
}
// Set the associated UI to Cron with the task ID
job_creation_info_clone.associated_ui = Some(AssociatedUI::Cron(cron_job.task_id.to_string()));

let job_id = job_manager
.lock()
Expand Down
3 changes: 3 additions & 0 deletions shinkai-bin/shinkai-node/src/llm_provider/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ pub enum LLMProviderError {
AgentNotFound(String),
MessageTooLargeForLLM { max_tokens: usize, used_tokens: usize },
SomeError(String),
APIError(String),
}

impl fmt::Display for LLMProviderError {
Expand Down Expand Up @@ -176,6 +177,7 @@ impl fmt::Display for LLMProviderError {
write!(f, "Message too large for LLM: Used {} tokens, but the maximum allowed is {}.", used_tokens, max_tokens)
},
LLMProviderError::SomeError(s) => write!(f, "{}", s),
LLMProviderError::APIError(s) => write!(f, "{}", s),
}
}
}
Expand Down Expand Up @@ -256,6 +258,7 @@ impl LLMProviderError {
LLMProviderError::AgentNotFound(_) => "AgentNotFound",
LLMProviderError::MessageTooLargeForLLM { .. } => "MessageTooLargeForLLM",
LLMProviderError::SomeError(_) => "SomeError",
LLMProviderError::APIError(_) => "APIError",
};

format!("Error {} with message: {}", error_name, self)
Expand Down
Loading

0 comments on commit 0535562

Please sign in to comment.