feat: Implement Ollama OAI Bridge with core functionality
- Add BridgeProperties class for configuration management. - Create GatewayProxyConfiguration to define routing and proxying logic. - Implement LlamaServerClient for communication with the upstream Llama server. - Develop OllamaDiscoveryController to handle API requests and responses. - Introduce OllamaDiscoveryService for business logic and data processing. - Set up OllamaOaiBridgeApplication as the main entry point for the application. - Add RequestBodyCachingFilter to cache request bodies for processing. - Create application.properties for configuration settings. - Implement unit tests for the application to ensure functionality. - Add start.sh script for easy application startup.
This commit is contained in:
23
start.sh
Executable file
23
start.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
jar_file="$script_dir/ollama-oai-bridge.jar"
|
||||
|
||||
if [[ ! -f "$jar_file" ]]; then
|
||||
echo "Jar not found: $jar_file" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
java_opts=()
|
||||
if [[ -n "${JAVA_OPTS:-}" ]]; then
|
||||
read -r -a java_opts <<<"${JAVA_OPTS}"
|
||||
fi
|
||||
|
||||
app_opts=()
|
||||
if [[ -n "${OLLAMA_OAI_BRIDGE_OPTS:-}" ]]; then
|
||||
read -r -a app_opts <<<"${OLLAMA_OAI_BRIDGE_OPTS}"
|
||||
fi
|
||||
|
||||
exec java "${java_opts[@]}" "${app_opts[@]}" -jar "$jar_file" "$@"
|
||||
Reference in New Issue
Block a user