├── src
├── client
│ ├── __init__.py
│ ├── utils
│ │ └── __init__.py
│ ├── content
│ │ ├── __init__.py
│ │ ├── config
│ │ │ ├── __init__.py
│ │ │ ├── tabs
│ │ │ │ └── __init__.py
│ │ │ └── config.py
│ │ └── tools
│ │ │ ├── __init__.py
│ │ │ ├── tabs
│ │ │ └── __init__.py
│ │ │ └── tools.py
│ ├── spring_ai
│ │ ├── src
│ │ │ └── main
│ │ │ │ ├── resources
│ │ │ │ ├── application.yml
│ │ │ │ └── application-dev.yml
│ │ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── springframework
│ │ │ │ └── ai
│ │ │ │ └── openai
│ │ │ │ └── samples
│ │ │ │ └── helloworld
│ │ │ │ ├── model
│ │ │ │ ├── ChatMessage.java
│ │ │ │ ├── ChatStreamResponse.java
│ │ │ │ ├── ChatRequest.java
│ │ │ │ ├── ChatChoice.java
│ │ │ │ └── ChatResponse.java
│ │ │ │ ├── WebCorsConfig.java
│ │ │ │ ├── Application.java
│ │ │ │ └── Config.java
│ │ ├── ollama-values.yaml
│ │ ├── templates
│ │ │ ├── obaas.yaml
│ │ │ └── start.sh
│ │ └── LICENSE.txt
│ ├── media
│ │ ├── logo.png
│ │ └── favicon.png
│ ├── mcp
│ │ ├── rag
│ │ │ ├── cover.png
│ │ │ ├── images
│ │ │ │ ├── export.png
│ │ │ │ └── rag_tool.png
│ │ │ ├── main.py
│ │ │ ├── rag_base_optimizer_config_direct.py
│ │ │ └── rag_base_optimizer_config_mcp.py
│ │ └── todo_list.md
│ └── Dockerfile
├── common
│ ├── __init__.py
│ └── _version.py
├── server
│ ├── __init__.py
│ ├── api
│ │ ├── __init__.py
│ │ ├── utils
│ │ │ ├── __init__.py
│ │ │ ├── README.md
│ │ │ └── mcp.py
│ │ └── v1
│ │ │ ├── __init__.py
│ │ │ ├── probes.py
│ │ │ └── mcp.py
│ ├── agents
│ │ └── __init__.py
│ ├── bootstrap
│ │ ├── __init__.py
│ │ ├── README.md
│ │ ├── bootstrap.py
│ │ ├── settings.py
│ │ ├── configfile.py
│ │ └── databases.py
│ ├── mcp
│ │ ├── tools
│ │ │ └── __init__.py
│ │ ├── prompts
│ │ │ ├── __init__.py
│ │ │ └── cache.py
│ │ ├── proxies
│ │ │ ├── __init__.py
│ │ │ └── sqlcl.py
│ │ ├── resources
│ │ │ └── __init__.py
│ │ └── __init__.py
│ ├── etc
│ │ └── README.md
│ ├── wip
│ │ └── settings.py
│ └── Dockerfile
├── .streamlit
│ └── config.toml
├── entrypoint.sh
└── Dockerfile
├── helm
├── .helmignore
├── Chart.yaml
├── templates
│ ├── global-api-secret.yaml
│ ├── client
│ │ ├── service.yaml
│ │ ├── configmap.yaml
│ │ ├── hpa.yaml
│ │ └── ingress.yaml
│ ├── ollama
│ │ └── service-11434.yaml
│ └── server
│ │ ├── database
│ │ ├── adb-wallet-secret.yaml
│ │ ├── priv-secret.yaml
│ │ ├── adb-operator.yaml
│ │ ├── oci-configmap.yaml
│ │ ├── auth-secret.yaml
│ │ ├── init-configmap.yaml
│ │ └── init-job.yaml
│ │ ├── service.yaml
│ │ ├── hpa.yaml
│ │ └── ingress.yaml
└── examples
│ ├── values-kind-adb-free.yaml
│ ├── values-kind-sidb-free.yaml
│ └── values-kind-other.yaml
├── docs
├── layouts
│ ├── shortcodes
│ │ ├── short_app_ref.html
│ │ ├── full_app_ref.html
│ │ ├── imagelink.html
│ │ └── latest_release.html
│ └── partials
│ │ ├── content-footer.html
│ │ ├── logo.html
│ │ └── menu-footer.html
├── static
│ ├── images
│ │ ├── logo.png
│ │ ├── favicon.png
│ │ └── logo_130_130.png
│ └── fonts
│ │ ├── MontserratAlt1-Light.woff
│ │ └── MontserratAlt1-Light.woff2
├── content
│ ├── client
│ │ ├── images
│ │ │ ├── gui.png
│ │ │ ├── api_server.png
│ │ │ ├── arch_overview.png
│ │ │ └── vector_storage.png
│ │ ├── testbed
│ │ │ └── images
│ │ │ │ ├── test.png
│ │ │ │ ├── upload.png
│ │ │ │ ├── evaluation.png
│ │ │ │ ├── generate.png
│ │ │ │ ├── generation.png
│ │ │ │ ├── qa_dataset.png
│ │ │ │ └── evaluation_report.png
│ │ ├── tools
│ │ │ ├── images
│ │ │ │ ├── embed.png
│ │ │ │ ├── split.png
│ │ │ │ ├── chatbot_input_bar.png
│ │ │ │ ├── chatbot_rephrase.png
│ │ │ │ ├── prompt_eng_system.png
│ │ │ │ └── prompt_eng_context.png
│ │ │ └── _index.md
│ │ ├── chatbot
│ │ │ └── images
│ │ │ │ ├── chatbot_vs.png
│ │ │ │ ├── language_parameters.png
│ │ │ │ └── chatbot_history_context.png
│ │ ├── configuration
│ │ │ ├── images
│ │ │ │ ├── models_add.png
│ │ │ │ ├── oci_config.png
│ │ │ │ ├── models_config.png
│ │ │ │ ├── database_config.png
│ │ │ │ ├── settings_upload.png
│ │ │ │ ├── settings_download.png
│ │ │ │ └── settings_spring_ai.png
│ │ │ ├── settings.md
│ │ │ └── _index.md
│ │ └── api_server
│ │ │ ├── images
│ │ │ ├── api_server_config.png
│ │ │ ├── api_server_activity.png
│ │ │ └── api_server_settings.png
│ │ │ └── _index.md
│ ├── advanced
│ │ ├── images
│ │ │ ├── export.png
│ │ │ ├── rag_tool.png
│ │ │ ├── infra_oci.png
│ │ │ ├── iac_stack_k8s_info.png
│ │ │ ├── iac_stack_vm_info.png
│ │ │ ├── iac_stack_information.png
│ │ │ ├── iac_stack_k8s_optimizer.png
│ │ │ ├── iac_stack_review_apply.png
│ │ │ ├── iac_stack_vm_optimizer.png
│ │ │ ├── iac_stack_access_control.png
│ │ │ └── iac_stack_k8s_access_control.png
│ │ └── _index.md
│ ├── walkthrough
│ │ └── images
│ │ │ ├── models_edit.png
│ │ │ ├── split_embed_web.png
│ │ │ ├── chatbot_no_models.png
│ │ │ ├── chatbot_say_hello.png
│ │ │ ├── chatbot_vs_enable.png
│ │ │ ├── models_enable_llm.png
│ │ │ └── models_enable_embed.png
│ └── help
│ │ ├── _index.md
│ │ └── troubleshooting
│ │ └── _index.md
├── demo
│ └── README.md
├── .gitignore
├── assets
│ └── css
│ │ ├── fonts.css
│ │ ├── theme-docs-dark.css
│ │ └── theme-docs-light.css
├── README.md
└── hugo.toml
├── opentofu
├── versions.tf
├── modules
│ ├── network
│ │ ├── provider.tf
│ │ ├── variables.tf
│ │ └── output.tf
│ ├── vm
│ │ ├── provider.tf
│ │ ├── locals.tf
│ │ ├── variables.tf
│ │ ├── iam.tf
│ │ ├── data.tf
│ │ └── nsgs.tf
│ └── kubernetes
│ │ ├── provider.tf
│ │ ├── output.tf
│ │ ├── cfgmgt_optimizer.tf
│ │ ├── templates
│ │ ├── cloudinit-oke.sh
│ │ └── ai-optimizer-values.yaml
│ │ ├── cfgmgt.tf
│ │ ├── data.tf
│ │ └── variables.tf
├── .gitignore
├── examples
│ ├── vm-arm-shape.tfvars
│ ├── k8s-byo-other-db.tfvars
│ ├── vm-byo-adb.tfvars
│ ├── k8s-new-adb.tfvars
│ ├── vm-byo-other-db.tfvars
│ ├── vm-new-adb.tfvars
│ └── README.md
├── data.tf
├── output.tf
├── module_network.tf
├── provider.tf
└── module_vm.tf
├── .github
├── ISSUE_TEMPLATE
│ ├── config.yml
│ ├── 3-doc_improvement.yml
│ └── 1-feature_request.yml
└── workflows
│ └── pytest.yml
├── .dockerignore
├── tests
├── unit
│ ├── conftest.py
│ ├── common
│ │ └── test_version.py
│ ├── client
│ │ └── conftest.py
│ └── server
│ │ ├── bootstrap
│ │ ├── conftest.py
│ │ └── test_bootstrap_module_config.py
│ │ └── api
│ │ └── utils
│ │ └── test_utils_module_config.py
├── integration
│ ├── conftest.py
│ ├── client
│ │ ├── content
│ │ │ └── test_testbed.py
│ │ └── utils
│ │ │ └── test_st_footer.py
│ └── server
│ │ └── api
│ │ └── v1
│ │ └── test_probes.py
└── conftest.py
├── pytest.ini
├── widget
├── index.html
└── app.js
├── .yamllint
├── SECURITY.md
├── LICENSE.txt
├── pyproject.toml
├── CONTRIBUTING.md
└── .gitignore
/src/client/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/common/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/server/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/helm/.helmignore:
--------------------------------------------------------------------------------
1 | scripts/
--------------------------------------------------------------------------------
/src/client/utils/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/server/api/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/content/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/server/agents/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/server/api/utils/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/server/bootstrap/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/server/mcp/tools/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/content/config/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/content/tools/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/server/mcp/prompts/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/server/mcp/proxies/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/server/mcp/resources/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/content/config/tabs/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/client/content/tools/tabs/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/layouts/shortcodes/short_app_ref.html:
--------------------------------------------------------------------------------
1 | {{ .Site.Params.ShortName }}
--------------------------------------------------------------------------------
/src/client/spring_ai/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | spring:
2 | profiles:
3 | active: dev
4 |
--------------------------------------------------------------------------------
/src/client/media/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/src/client/media/logo.png
--------------------------------------------------------------------------------
/docs/static/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/static/images/logo.png
--------------------------------------------------------------------------------
/src/client/mcp/rag/cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/src/client/mcp/rag/cover.png
--------------------------------------------------------------------------------
/src/client/media/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/src/client/media/favicon.png
--------------------------------------------------------------------------------
/docs/layouts/shortcodes/full_app_ref.html:
--------------------------------------------------------------------------------
1 | {{ .Site.Params.LongName }} (the {{ .Site.Params.ShortName }})
--------------------------------------------------------------------------------
/docs/static/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/static/images/favicon.png
--------------------------------------------------------------------------------
/src/server/etc/README.md:
--------------------------------------------------------------------------------
1 | # etc
2 |
3 | Director to store settings files for automatic consumption on startup.
4 |
--------------------------------------------------------------------------------
/docs/content/client/images/gui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/images/gui.png
--------------------------------------------------------------------------------
/src/server/bootstrap/README.md:
--------------------------------------------------------------------------------
1 | # Bootstrap
2 |
3 | To avoid circular logic, bootstrap should only call utils (not core)
--------------------------------------------------------------------------------
/docs/static/images/logo_130_130.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/static/images/logo_130_130.png
--------------------------------------------------------------------------------
/src/client/mcp/rag/images/export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/src/client/mcp/rag/images/export.png
--------------------------------------------------------------------------------
/docs/content/advanced/images/export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/export.png
--------------------------------------------------------------------------------
/docs/layouts/shortcodes/imagelink.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/src/client/mcp/rag/images/rag_tool.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/src/client/mcp/rag/images/rag_tool.png
--------------------------------------------------------------------------------
/docs/content/advanced/images/rag_tool.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/rag_tool.png
--------------------------------------------------------------------------------
/docs/content/client/images/api_server.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/images/api_server.png
--------------------------------------------------------------------------------
/docs/content/advanced/images/infra_oci.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/infra_oci.png
--------------------------------------------------------------------------------
/docs/content/client/images/arch_overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/images/arch_overview.png
--------------------------------------------------------------------------------
/docs/content/client/testbed/images/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/testbed/images/test.png
--------------------------------------------------------------------------------
/docs/content/client/tools/images/embed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/tools/images/embed.png
--------------------------------------------------------------------------------
/docs/content/client/tools/images/split.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/tools/images/split.png
--------------------------------------------------------------------------------
/docs/static/fonts/MontserratAlt1-Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/static/fonts/MontserratAlt1-Light.woff
--------------------------------------------------------------------------------
/docs/static/fonts/MontserratAlt1-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/static/fonts/MontserratAlt1-Light.woff2
--------------------------------------------------------------------------------
/docs/content/client/images/vector_storage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/images/vector_storage.png
--------------------------------------------------------------------------------
/docs/content/client/testbed/images/upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/testbed/images/upload.png
--------------------------------------------------------------------------------
/docs/content/client/chatbot/images/chatbot_vs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/chatbot/images/chatbot_vs.png
--------------------------------------------------------------------------------
/docs/content/client/testbed/images/evaluation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/testbed/images/evaluation.png
--------------------------------------------------------------------------------
/docs/content/client/testbed/images/generate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/testbed/images/generate.png
--------------------------------------------------------------------------------
/docs/content/client/testbed/images/generation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/testbed/images/generation.png
--------------------------------------------------------------------------------
/docs/content/client/testbed/images/qa_dataset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/testbed/images/qa_dataset.png
--------------------------------------------------------------------------------
/docs/content/walkthrough/images/models_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/walkthrough/images/models_edit.png
--------------------------------------------------------------------------------
/docs/content/advanced/images/iac_stack_k8s_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/iac_stack_k8s_info.png
--------------------------------------------------------------------------------
/docs/content/advanced/images/iac_stack_vm_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/iac_stack_vm_info.png
--------------------------------------------------------------------------------
/docs/content/walkthrough/images/split_embed_web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/walkthrough/images/split_embed_web.png
--------------------------------------------------------------------------------
/docs/content/advanced/images/iac_stack_information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/iac_stack_information.png
--------------------------------------------------------------------------------
/docs/content/client/tools/images/chatbot_input_bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/tools/images/chatbot_input_bar.png
--------------------------------------------------------------------------------
/docs/content/client/tools/images/chatbot_rephrase.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/tools/images/chatbot_rephrase.png
--------------------------------------------------------------------------------
/docs/content/client/tools/images/prompt_eng_system.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/tools/images/prompt_eng_system.png
--------------------------------------------------------------------------------
/docs/content/walkthrough/images/chatbot_no_models.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/walkthrough/images/chatbot_no_models.png
--------------------------------------------------------------------------------
/docs/content/walkthrough/images/chatbot_say_hello.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/walkthrough/images/chatbot_say_hello.png
--------------------------------------------------------------------------------
/docs/content/walkthrough/images/chatbot_vs_enable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/walkthrough/images/chatbot_vs_enable.png
--------------------------------------------------------------------------------
/docs/content/walkthrough/images/models_enable_llm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/walkthrough/images/models_enable_llm.png
--------------------------------------------------------------------------------
/src/server/api/utils/README.md:
--------------------------------------------------------------------------------
1 | # Utils
2 |
3 | Utils relies on core, which establishes the bootstrap objects/settings. Scripts here will reference other utils.
--------------------------------------------------------------------------------
/docs/content/advanced/images/iac_stack_k8s_optimizer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/iac_stack_k8s_optimizer.png
--------------------------------------------------------------------------------
/docs/content/advanced/images/iac_stack_review_apply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/iac_stack_review_apply.png
--------------------------------------------------------------------------------
/docs/content/advanced/images/iac_stack_vm_optimizer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/iac_stack_vm_optimizer.png
--------------------------------------------------------------------------------
/docs/content/client/configuration/images/models_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/configuration/images/models_add.png
--------------------------------------------------------------------------------
/docs/content/client/configuration/images/oci_config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/configuration/images/oci_config.png
--------------------------------------------------------------------------------
/docs/content/client/testbed/images/evaluation_report.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/testbed/images/evaluation_report.png
--------------------------------------------------------------------------------
/docs/content/client/tools/images/prompt_eng_context.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/tools/images/prompt_eng_context.png
--------------------------------------------------------------------------------
/docs/content/walkthrough/images/models_enable_embed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/walkthrough/images/models_enable_embed.png
--------------------------------------------------------------------------------
/docs/content/advanced/images/iac_stack_access_control.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/iac_stack_access_control.png
--------------------------------------------------------------------------------
/docs/content/client/api_server/images/api_server_config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/api_server/images/api_server_config.png
--------------------------------------------------------------------------------
/docs/content/client/chatbot/images/language_parameters.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/chatbot/images/language_parameters.png
--------------------------------------------------------------------------------
/docs/content/client/configuration/images/models_config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/configuration/images/models_config.png
--------------------------------------------------------------------------------
/docs/content/advanced/images/iac_stack_k8s_access_control.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/advanced/images/iac_stack_k8s_access_control.png
--------------------------------------------------------------------------------
/docs/content/client/api_server/images/api_server_activity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/api_server/images/api_server_activity.png
--------------------------------------------------------------------------------
/docs/content/client/api_server/images/api_server_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/api_server/images/api_server_settings.png
--------------------------------------------------------------------------------
/docs/content/client/configuration/images/database_config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/configuration/images/database_config.png
--------------------------------------------------------------------------------
/docs/content/client/configuration/images/settings_upload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/configuration/images/settings_upload.png
--------------------------------------------------------------------------------
/docs/content/client/chatbot/images/chatbot_history_context.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/chatbot/images/chatbot_history_context.png
--------------------------------------------------------------------------------
/docs/content/client/configuration/images/settings_download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/configuration/images/settings_download.png
--------------------------------------------------------------------------------
/docs/content/client/configuration/images/settings_spring_ai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oracle/ai-optimizer/HEAD/docs/content/client/configuration/images/settings_spring_ai.png
--------------------------------------------------------------------------------
/src/client/mcp/todo_list.md:
--------------------------------------------------------------------------------
1 | - [ ] Analyze requirements
2 | - [ ] Set up necessary files
3 | - [ ] Implement main functionality
4 | - [ ] Handle edge cases
5 | - [ ] Test the implementation
6 | - [ ] Verify results
7 |
--------------------------------------------------------------------------------
/docs/content/help/_index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = 'Get Help'
3 | +++
4 |
5 |
--------------------------------------------------------------------------------
/src/client/mcp/rag/main.py:
--------------------------------------------------------------------------------
1 | """
2 | Main module for RAG functionality.
3 | """
4 |
5 |
6 | def main():
7 | """
8 | Entry point for the RAG module.
9 | """
10 | print("Hello from rag!")
11 |
12 |
13 | if __name__ == "__main__":
14 | main()
15 |
--------------------------------------------------------------------------------
/docs/layouts/shortcodes/latest_release.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/docs/demo/README.md:
--------------------------------------------------------------------------------
1 | ## Demo: OracleVS extension for no data duplication in vectorstore
2 |
3 | Demo to show an *experimental* implementation of a "referenced" vectorstore, coming by a relational table data source.
4 |
5 | Run the Jupyter Notepad `oraclevs_new.ipynb` and follow the instructions and explanation there.
--------------------------------------------------------------------------------
/src/client/spring_ai/ollama-values.yaml:
--------------------------------------------------------------------------------
1 | ollama:
2 | gpu:
3 | enabled: true
4 | type: 'nvidia'
5 | number: 1
6 | models:
7 | - llama3.1
8 | - llama3.2
9 | - mxbai-embed-large
10 | - nomic-embed-text
11 | nodeSelector:
12 | node.kubernetes.io/instance-type: VM.GPU.A10.1
13 |
--------------------------------------------------------------------------------
/src/server/api/v1/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3 | Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
4 | """
5 |
6 | from . import chat, databases, embed, models, oci, probes, testbed, settings, mcp, mcp_prompts
7 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | ##############################################################################
2 | # Documentation Specific
3 | ##############################################################################
4 | /themes/
5 | /public/
6 | hugo_stats.json
7 |
8 | # Temporary lock file while building
9 | /.hugo_build.lock
--------------------------------------------------------------------------------
/opentofu/versions.tf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3 |
4 | # Do Not Modify. Updated during release cycle.
5 | locals {
6 | app_version = "0.0.0"
7 | compute_os_ver = "8.10"
8 | k8s_version = "1.34.1"
9 | }
--------------------------------------------------------------------------------
/docs/assets/css/fonts.css:
--------------------------------------------------------------------------------
1 | @import "fonts.css";
2 |
3 | @font-face {
4 | font-family: 'MontserratAlt1-Light';
5 | src: url('/ai-optimizer/fonts/MontserratAlt1-Light.woff2') format('woff2'),
6 | url('/ai-optimizer/fonts/MontserratAlt1-Light.woff') format('woff');
7 | font-weight: normal;
8 | font-style: normal;
9 | font-size: smaller;
10 | }
--------------------------------------------------------------------------------
/opentofu/modules/network/provider.tf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3 | # spell-checker: disable
4 |
5 | terraform {
6 | required_providers {
7 | oci = {
8 | source = "oracle/oci"
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/common/_version.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3 | Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
4 | """
5 |
6 | from importlib.metadata import version, PackageNotFoundError
7 |
8 | try:
9 | __version__ = version("ai-optimizer")
10 | except PackageNotFoundError:
11 | __version__ = "0.0.0"
12 |
--------------------------------------------------------------------------------
/docs/content/advanced/_index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = 'Advanced'
3 | weight = 40
4 | +++
5 |
9 |
10 | There is a lot more you can do with the {{< short_app_ref >}}. Explore some of the more Advanced capabilities here:
11 |
12 | {{% children %}}
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: 📖 Documentation
4 | url: https://oracle.github.io/ai-optimizer/
5 | about: Learn more about how to use the AI Optimizer and Toolkit
6 | - name: ❓ Anything else?
7 | url: https://oracledevs.slack.com/archives/C089NPXG8AU
8 | about: Ask questions or provide feedback on the AI Optimizer and Toolkit community Slack channel
--------------------------------------------------------------------------------
/opentofu/modules/vm/provider.tf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3 | # spell-checker: disable
4 |
5 | terraform {
6 | required_providers {
7 | oci = {
8 | source = "oracle/oci"
9 | configuration_aliases = [oci.home_region]
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/opentofu/modules/kubernetes/provider.tf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3 | # spell-checker: disable
4 |
5 | terraform {
6 | required_providers {
7 | oci = {
8 | source = "oracle/oci"
9 | configuration_aliases = [oci.home_region]
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/.streamlit/config.toml:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 | [global]
4 | disableWidgetStateDuplicationWarning = true
5 |
6 | [browser]
7 | gatherUsageStats = false
8 | serverAddress = "localhost"
9 |
10 | [server]
11 | cookieSecret = "oaie-client-cookie"
12 | headless = true
13 |
14 | [client]
15 | toolbarMode = "minimal"
--------------------------------------------------------------------------------
/src/server/bootstrap/bootstrap.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3 | Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
4 | """
5 | # spell-checker:ignore genai
6 |
7 | from server.bootstrap import databases, models, oci, settings
8 | from common import logging_config
9 |
10 | logger = logging_config.logging.getLogger("bootstrap")
11 |
12 | DATABASE_OBJECTS = databases.main()
13 | MODEL_OBJECTS = models.main()
14 | OCI_OBJECTS = oci.main()
15 | SETTINGS_OBJECTS = settings.main()
16 |
--------------------------------------------------------------------------------
/helm/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v2
2 | name: ai-optimizer
3 | description: A Helm chart Oracle AI Optimizer and Toolkit
4 | # Do Not Modify. Updated automatically during release cycle by .github/workflows/releases.yml
5 | version: 0.0.0
6 | appVersion: "0.0.0"
7 | type: application
8 | home: https://github.com/oracle/ai-optimizer
9 | sources:
10 | - https://github.com/oracle/ai-optimizer
11 | icon: https://github.com/oracle/ai-optimizer/blob/main/src/client/media/logo.png
12 | maintainers:
13 | - name: Oracle
14 | email: obaas_ww@oracle.com
15 | url: https://github.com/oracle/ai-optimizer
16 |
--------------------------------------------------------------------------------
/opentofu/.gitignore:
--------------------------------------------------------------------------------
1 | ##############################################################################
2 | # IaC
3 | ##############################################################################
4 | # Ignore all tfvars files (contain credentials)
5 | **/**.tfvars
6 | # But allow example tfvars files for CI/CD testing (safe, no real credentials)
7 | !examples/*.tfvars
8 |
9 | # Terraform/OpenTofu state and cache
10 | **/.terraform*
11 | **/terraform.tfstate*
12 | **/*.tfplan
13 | **/*.tfplan.out
14 |
15 | # Private keys and sensitive files
16 | **/*.pem
17 |
18 | # Stage directory
19 | **/stage/*.*
20 | **/stage/kubeconfig
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 |
4 | # Ignore everything
5 | **
6 |
7 | # Keep the src directory and pyproject.toml file
8 | !src/
9 | !pyproject.toml
10 |
11 | # Inside src, ignore specific things
12 | src/**/Dockerfile*
13 | src/**/__pycache__/
14 | src/**/.pytest_cache/
15 | src/**/tns_admin/
16 | src/**/.oci/
17 | src/**/.*
18 | src/**/*.sh
19 | src/**/*.log
20 |
21 | # But explicitly keep these
22 | !src/.streamlit
23 | !src/client/spring_ai/templates/start.sh
24 | !src/entrypoint.sh
--------------------------------------------------------------------------------
/helm/templates/global-api-secret.yaml:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 | # spell-checker: ignore nindent
4 |
5 | {{ include "global.apiKeyOrSecretName.required" . }}
6 |
7 | {{- if .Values.global.api.apiKey }}
8 | apiVersion: v1
9 | kind: Secret
10 | metadata:
11 | name: {{ include "global.apiSecretName" . }}
12 | labels:
13 | {{- include "global.labels" . | nindent 4 }}
14 | type: Opaque
15 | data:
16 | "{{ include "global.apiSecretKey" . }}": "{{ .Values.global.api.apiKey | b64enc }}"
17 | {{- end }}
--------------------------------------------------------------------------------
/opentofu/examples/vm-arm-shape.tfvars:
--------------------------------------------------------------------------------
1 | # Example: VM with ARM (Ampere) compute shape
2 |
3 | # Run: examples/test.sh
4 |
5 | # Deployment Configuration
6 | label_prefix = "CITEST"
7 | optimizer_version = "Stable"
8 | infrastructure = "VM"
9 |
10 | # New ADB with BYOL
11 | adb_ecpu_core_count = 4
12 | adb_license_model = "BRING_YOUR_OWN_LICENSE"
13 | adb_edition = "ENTERPRISE_EDITION"
14 | adb_networking = "SECURE_ACCESS"
15 | adb_whitelist_cidrs = "192.168.0.0/16"
16 |
17 | # ARM Compute Shape
18 | compute_cpu_shape = "VM.Standard.A1.Flex"
19 | compute_cpu_ocpu = 4
20 |
21 | # Load Balancer
22 | lb_min_shape = 10
23 | lb_max_shape = 10
24 |
--------------------------------------------------------------------------------
/opentofu/examples/k8s-byo-other-db.tfvars:
--------------------------------------------------------------------------------
1 | # Example: Kubernetes with BYO Other Database (non-ADB)
2 |
3 | # Run: examples/test.sh
4 |
5 | # Deployment Configuration
6 | label_prefix = "CITEST"
7 | optimizer_version = "Experimental"
8 | infrastructure = "Kubernetes"
9 |
10 | # BYO Other Database
11 | byo_db_type = "OTHER"
12 | byo_db_password = "FakePassword123!NotReal"
13 | byo_odb_host = "fake-db-host.example.com"
14 | byo_odb_port = 1521
15 | byo_odb_service = "FAKEPDB.example.com"
16 |
17 | # Compute
18 | compute_cpu_shape = "VM.Standard.A1.Flex"
19 | compute_cpu_ocpu = 4
20 |
21 | # Load Balancer
22 | lb_min_shape = 10
23 | lb_max_shape = 50
24 |
--------------------------------------------------------------------------------
/opentofu/examples/vm-byo-adb.tfvars:
--------------------------------------------------------------------------------
1 | # Example: VM deployment with BYO Autonomous Database
2 |
3 | # Run: examples/test.sh
4 |
5 | # Deployment Configuration
6 | label_prefix = "CITEST"
7 | optimizer_version = "Stable"
8 | infrastructure = "VM"
9 |
10 | # BYO Autonomous Database
11 | byo_db_type = "ADB-S"
12 | byo_adb_ocid = "ocid1.autonomousdatabase.oc1.phx.aaaaaaaafakeadbocidforgithubactions"
13 | byo_db_password = "FakePassword123!NotReal"
14 |
15 | # Compute
16 | compute_cpu_shape = "VM.Standard.E5.Flex"
17 | compute_cpu_ocpu = 2
18 |
19 | # Load Balancer
20 | lb_min_shape = 10
21 | lb_max_shape = 10
22 |
23 | # Network Access
24 | client_allowed_cidrs = "10.0.0.0/8"
25 | server_allowed_cidrs = "10.0.0.0/8"
26 |
--------------------------------------------------------------------------------
/opentofu/examples/k8s-new-adb.tfvars:
--------------------------------------------------------------------------------
1 | # Example: Kubernetes deployment with new Autonomous Database
2 |
3 | # Run: examples/test.sh
4 |
5 | # Deployment Configuration
6 | label_prefix = "CITEST"
7 | optimizer_version = "Stable"
8 | infrastructure = "Kubernetes"
9 |
10 | # New Autonomous Database
11 | adb_ecpu_core_count = 2
12 | adb_data_storage_size_in_gb = 20
13 | adb_is_cpu_auto_scaling_enabled = true
14 | adb_license_model = "LICENSE_INCLUDED"
15 | adb_networking = "PRIVATE_ENDPOINT_ACCESS"
16 | adb_whitelist_cidrs = ""
17 |
18 | # Compute
19 | compute_cpu_shape = "VM.Standard.E4.Flex"
20 | compute_cpu_ocpu = 2
21 |
22 | # Load Balancer
23 | lb_min_shape = 10
24 | lb_max_shape = 100
25 |
--------------------------------------------------------------------------------
/opentofu/examples/vm-byo-other-db.tfvars:
--------------------------------------------------------------------------------
1 | # Example: VM deployment with BYO Other Database (non-ADB)
2 |
3 | # Run: examples/test.sh
4 |
5 | # Deployment Configuration
6 | label_prefix = "CITEST"
7 | optimizer_version = "Stable"
8 | infrastructure = "VM"
9 |
10 | # BYO Other Database
11 | byo_db_type = "OTHER"
12 | byo_db_password = "FakePassword123!NotReal"
13 | byo_odb_host = "fake-db-host.example.com"
14 | byo_odb_port = 1521
15 | byo_odb_service = "FAKEPDB.example.com"
16 |
17 | # Compute
18 | compute_cpu_shape = "VM.Standard.E5.Flex"
19 | compute_cpu_ocpu = 2
20 |
21 | # Load Balancer
22 | lb_min_shape = 10
23 | lb_max_shape = 10
24 |
25 | # Network Access
26 | client_allowed_cidrs = "10.0.0.0/8"
27 | server_allowed_cidrs = "10.0.0.0/8"
28 |
--------------------------------------------------------------------------------
/helm/templates/client/service.yaml:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 | # spell-checker: ignore nindent
4 |
5 | {{- if .Values.client.enabled }}
6 | apiVersion: v1
7 | kind: Service
8 | metadata:
9 | name: {{ include "global.fullname" . }}-client-http
10 | labels:
11 | app.kubernetes.io/component: client
12 | {{- include "global.labels" . | nindent 4 }}
13 | spec:
14 | type: {{ .Values.client.service.type }}
15 | ports:
16 | - protocol: TCP
17 | port: 80
18 | targetPort: 8501
19 | selector:
20 | app.kubernetes.io/component: client
21 | {{- include "global.selectorLabels" . | nindent 4 }}
22 | {{ end -}}
--------------------------------------------------------------------------------
/helm/examples/values-kind-adb-free.yaml:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 | # spell-checker: ignore sidb ollama
4 |
5 | # Example Helm Values for Containerized ADB
6 | server:
7 | replicaCount: 1
8 | image:
9 | repository: localhost/ai-optimizer-server
10 | tag: latest
11 | database:
12 | type: "ADB-FREE"
13 | image:
14 | repository: container-registry.oracle.com/database/adb-free
15 | tag: latest
16 | client:
17 | replicaCount: 1
18 | image:
19 | repository: localhost/ai-optimizer-client
20 | tag: latest
21 | ollama:
22 | enabled: true
23 | replicaCount: 1
24 | models:
25 | enabled: true
26 |
--------------------------------------------------------------------------------
/helm/examples/values-kind-sidb-free.yaml:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 | # spell-checker: ignore sidb ollama
4 |
5 | # Example Helm Values for Containerized SIDB
6 | server:
7 | replicaCount: 1
8 | image:
9 | repository: localhost/ai-optimizer-server
10 | tag: latest
11 | database:
12 | type: "SIDB-FREE"
13 | image:
14 | repository: container-registry.oracle.com/database/free
15 | tag: latest
16 | client:
17 | replicaCount: 1
18 | image:
19 | repository: localhost/ai-optimizer-client
20 | tag: latest
21 | ollama:
22 | enabled: true
23 | replicaCount: 1
24 | models:
25 | enabled: true
26 |
--------------------------------------------------------------------------------
/helm/templates/ollama/service-11434.yaml:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 | # spell-checker: ignore nindent ollama
4 |
5 | {{- if .Values.ollama.enabled }}
6 | apiVersion: v1
7 | kind: Service
8 | metadata:
9 | name: {{ include "ollama.serviceName" . }}
10 | labels:
11 | app.kubernetes.io/component: ollama
12 | {{- include "global.labels" . | nindent 4 }}
13 | spec:
14 | type: "ClusterIP"
15 | ports:
16 | - port: 11434
17 | targetPort: api
18 | protocol: TCP
19 | name: api
20 | selector:
21 | app.kubernetes.io/component: ollama
22 | {{ include "global.selectorLabels" . | nindent 4 }}
23 | {{ end -}}
--------------------------------------------------------------------------------
/helm/templates/server/database/adb-wallet-secret.yaml:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 | # spell-checker: ignore nindent
4 |
5 | # ADB Wallet Password Secret
6 | {{- if .Values.server.database }}
7 | {{- if eq (include "server.database.isADBS" .) "true" }}
8 | apiVersion: v1
9 | kind: Secret
10 | metadata:
11 | name: {{ .Release.Name }}-adb-wallet-pass-{{ .Release.Revision }}
12 | labels:
13 | app.kubernetes.io/component: database
14 | {{- include "global.labels" . | nindent 4 }}
15 | stringData:
16 | {{ .Release.Name }}-adb-wallet-pass-{{ .Release.Revision }}: {{ include "server.randomPassword" . | quote }}
17 | {{- end }}
18 | {{- end }}
19 |
--------------------------------------------------------------------------------
/opentofu/modules/network/variables.tf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3 | # spell-checker: disable
4 |
5 | variable "compartment_id" {
6 | type = string
7 | }
8 |
9 | variable "label_prefix" {
10 | type = string
11 | }
12 |
13 | variable "infra" {
14 | type = string
15 | }
16 |
17 | variable "vcn_cidr" {
18 | type = map(any)
19 | default = {
20 | "VM" = ["10.42.0.0/27"]
21 | "Kubernetes" = ["10.42.0.0/16"]
22 | }
23 | }
24 |
25 | variable "oci_services" {
26 | description = "OCI Services Network object containing id, name, and cidr_block"
27 | type = object({
28 | cidr_block = string
29 | id = string
30 | name = string
31 | })
32 | }
--------------------------------------------------------------------------------
/docs/content/client/tools/_index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = 'Tools'
3 | menus = 'main'
4 | weight = 90
5 | +++
6 |
7 |
11 |
12 | The {{< full_app_ref >}} has many features that can be used with Large Language Models.
13 |
14 | ## 📚 Split/Embed
15 |
16 | Splitting and/or Embedding unstructured data is the foundation to Oracle Database Vector Search.
17 |
18 | ## 🎤 Prompts
19 |
20 | Prompts are a set of instructions given to the language model to guide the response. They are used to set the context or define the kind of response you are expecting. The {{< short_app_ref >}} provides both System and Context example prompts and allows you to modify these prompts to your needs.
21 |
--------------------------------------------------------------------------------
/opentofu/data.tf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3 | # spell-checker: disable
4 |
5 | data "oci_identity_availability_domains" "all" {
6 | compartment_id = var.tenancy_ocid
7 | }
8 |
9 | data "oci_core_services" "core_services" {
10 | filter {
11 | name = "name"
12 | values = ["All .* Services In Oracle Services Network"]
13 | regex = true
14 | }
15 | }
16 |
17 | data "oci_database_autonomous_database" "byo_adb" {
18 | for_each = var.byo_db_type == "ADB-S" ? { byo = true } : {}
19 | autonomous_database_id = var.byo_adb_ocid
20 | }
21 |
22 | data "oci_core_subnet" "byo_vcn_private" {
23 | count = var.byo_vcn_ocid != "" ? 1 : 0
24 | subnet_id = var.byo_private_subnet_ocid
25 | }
--------------------------------------------------------------------------------
/opentofu/examples/vm-new-adb.tfvars:
--------------------------------------------------------------------------------
1 | # Example: VM deployment with new Autonomous Database
2 |
3 | # Run: examples/test.sh
4 |
5 | # Deployment Configuration
6 | label_prefix = "CITEST"
7 | optimizer_version = "Stable"
8 | infrastructure = "VM"
9 |
10 | # New Autonomous Database (not BYO)
11 | # byo_db_type not set - will create new ADB
12 | adb_ecpu_core_count = 2
13 | adb_data_storage_size_in_gb = 20
14 | adb_is_cpu_auto_scaling_enabled = true
15 | adb_license_model = "LICENSE_INCLUDED"
16 | adb_networking = "SECURE_ACCESS"
17 | adb_whitelist_cidrs = "0.0.0.0/0"
18 |
19 | # Compute
20 | compute_cpu_shape = "VM.Standard.E5.Flex"
21 | compute_cpu_ocpu = 2
22 |
23 | # Load Balancer
24 | lb_min_shape = 10
25 | lb_max_shape = 10
26 |
27 | # Network Access
28 | client_allowed_cidrs = "0.0.0.0/0"
29 | server_allowed_cidrs = "0.0.0.0/0"
30 |
--------------------------------------------------------------------------------
/tests/unit/conftest.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3 | Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
4 |
5 | Pytest configuration for unit tests.
6 |
7 | This conftest automatically marks all tests in the test/unit/ directory
8 | with the 'unit' marker, enabling selective test execution:
9 |
10 | pytest -m "unit" # Run only unit tests
11 | pytest -m "not unit" # Skip unit tests
12 | pytest -m "unit and not slow" # Fast unit tests only
13 | """
14 |
15 | import pytest
16 |
17 |
18 | def pytest_collection_modifyitems(items):
19 | """Automatically add 'unit' marker to all tests in this directory."""
20 | for item in items:
21 | # Check if the test is under test/unit/
22 | if "/test/unit/" in str(item.fspath):
23 | item.add_marker(pytest.mark.unit)
24 |
--------------------------------------------------------------------------------
/opentofu/modules/kubernetes/output.tf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3 | # spell-checker: disable
4 |
5 | output "kubeconfig_cmd" {
6 | description = "Command to generate kubeconfig file"
7 | value = format(
8 | "oci ce cluster create-kubeconfig --cluster-id %s --region %s --token-version 2.0.0 --kube-endpoint %s --file $HOME/.kube/config --with-auth-context --profile DEFAULT",
9 | oci_containerengine_cluster.default_cluster.id,
10 | var.region,
11 | oci_containerengine_cluster.default_cluster.endpoint_config[0].is_public_ip_enabled ? "PUBLIC_ENDPOINT" : "PRIVATE_ENDPOINT"
12 | )
13 | }
14 |
15 | output "helm_manual_instructions" {
16 | description = "Instructions for manual Helm deployment (when cfgmgt was skipped)"
17 | value = local.should_show_manual_steps ? local.manual_helm_instructions : null
18 | }
--------------------------------------------------------------------------------
/helm/templates/server/database/priv-secret.yaml:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 | # spell-checker: ignore nindent
4 |
5 | # Database Privileged User Secret
6 | {{- if .Values.server.database }}
7 | {{- $secretName := include "server.databasePrivSecret" . }}
8 | {{- $secret_existing := lookup "v1" "Secret" .Release.Namespace $secretName }}
9 | {{- if not $secret_existing }}
10 | apiVersion: v1
11 | kind: Secret
12 | metadata:
13 | name: {{ $secretName }}
14 | labels:
15 | app.kubernetes.io/component: database
16 | {{- include "global.labels" . | nindent 4 }}
17 | annotations:
18 | helm.sh/resource-policy: keep
19 | type: Opaque
20 | stringData:
21 | username: {{ if eq (include "server.database.isADB" .) "true" }}"ADMIN"{{ else }}"SYSTEM"{{ end }}
22 | password: {{ include "server.randomPassword" . | quote }}
23 | {{- end }}
24 | {{- end }}
25 |
--------------------------------------------------------------------------------
/tests/integration/conftest.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3 | Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
4 |
5 | Pytest configuration for integration tests.
6 |
7 | This conftest automatically marks all tests in the test/integration/ directory
8 | with the 'integration' marker, enabling selective test execution:
9 |
10 | pytest -m "integration" # Run only integration tests
11 | pytest -m "not integration" # Skip integration tests
12 | pytest -m "integration and not db" # Integration tests without DB
13 | """
14 |
15 | import pytest
16 |
17 |
18 | def pytest_collection_modifyitems(items):
19 | """Automatically add 'integration' marker to all tests in this directory."""
20 | for item in items:
21 | # Check if the test is under test/integration/
22 | if "/test/integration/" in str(item.fspath):
23 | item.add_marker(pytest.mark.integration)
24 |
--------------------------------------------------------------------------------
/src/client/spring_ai/src/main/java/org/springframework/ai/openai/samples/helloworld/model/ChatMessage.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3 | Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
4 | */
5 |
6 | package org.springframework.ai.openai.samples.helloworld.model;
7 |
8 |
9 | public class ChatMessage {
10 | private String role;
11 | private String content;
12 |
13 | public ChatMessage() {}
14 |
15 | public ChatMessage(String role, String content) {
16 | this.role = role;
17 | this.content = content;
18 | }
19 |
20 | public String getRole() {
21 | return role;
22 | }
23 |
24 | public void setRole(String role) {
25 | this.role = role;
26 | }
27 |
28 | public String getContent() {
29 | return content;
30 | }
31 |
32 | public void setContent(String content) {
33 | this.content = content;
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/opentofu/output.tf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3 | # spell-checker: disable
4 |
5 | output "app_version" {
6 | description = "Application Version"
7 | value = local.app_version
8 | }
9 |
10 | output "app_name" {
11 | description = "Application Name (Label). The namespace for K8s installations"
12 | value = local.label_prefix
13 | }
14 |
15 | output "optimizer_client_url" {
16 | description = "URL for AI Optimizer and Toolkit Client Access"
17 | value = var.deploy_optimizer ? format("http://%s", oci_load_balancer_load_balancer.lb.ip_address_details[0].ip_address) : "N/A"
18 | }
19 |
20 | output "optimizer_server_url" {
21 | description = "URL for AI Optimizer and Toolkit Server API Access"
22 | value = var.deploy_optimizer ? format("http://%s:8000/v1/docs", oci_load_balancer_load_balancer.lb.ip_address_details[0].ip_address) : "N/A"
23 | }
24 |
--------------------------------------------------------------------------------
/src/client/spring_ai/src/main/java/org/springframework/ai/openai/samples/helloworld/model/ChatStreamResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3 | Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
4 | */
5 | package org.springframework.ai.openai.samples.helloworld.model;
6 |
7 |
8 | public class ChatStreamResponse {
9 | private String object;
10 | private ChatChoice[] choices;
11 |
12 | public ChatStreamResponse() {}
13 |
14 | public ChatStreamResponse(String object, ChatChoice[] choices) {
15 | this.object = object;
16 | this.choices = choices;
17 | }
18 |
19 | public String getObject() {
20 | return object;
21 | }
22 |
23 | public void setObject(String object) {
24 | this.object = object;
25 | }
26 |
27 | public ChatChoice[] getChoices() {
28 | return choices;
29 | }
30 |
31 | public void setChoices(ChatChoice[] choices) {
32 | this.choices = choices;
33 | }
34 | }
--------------------------------------------------------------------------------
/helm/examples/values-kind-other.yaml:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 | # spell-checker: ignore sidb ollama
4 |
5 | # Example Helm Values for external databases
6 | server:
7 | replicaCount: 1
8 | image:
9 | repository: localhost/ai-optimizer-server
10 | tag: latest
11 | database:
12 | type: "OTHER"
13 | other:
14 | # Option 1: Provide full DSN string
15 | dsn: "mydbhost.example.com:1521/MYSERVICE"
16 | # Option 2: Provide individual components (commented out when using dsn)
17 | # host: "mydbhost.example.com"
18 | # port: "1521"
19 | # service_name: "MYSERVICE"
20 | privAuthN:
21 | secretName: "db-priv-authn"
22 | passwordKey: "password"
23 | client:
24 | replicaCount: 1
25 | image:
26 | repository: localhost/ai-optimizer-client
27 | tag: latest
28 | ollama:
29 | enabled: true
30 | replicaCount: 1
31 | models:
32 | enabled: true
33 |
--------------------------------------------------------------------------------
/src/client/content/tools/tools.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3 | Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
4 | """
5 |
6 | import inspect
7 | import streamlit as st
8 |
9 | from client.content.tools.tabs.prompt_eng import get_prompts, display_prompt_eng
10 | from client.content.tools.tabs.split_embed import display_split_embed
11 | from client.content.config.tabs.models import get_models
12 | from client.content.config.tabs.databases import get_databases
13 | from client.content.config.tabs.oci import get_oci
14 |
15 |
16 | def main() -> None:
17 | """Streamlit GUI"""
18 | prompt_eng, split_embed = st.tabs(["🎤 Prompts", "📚 Split/Embed"])
19 |
20 | with prompt_eng:
21 | get_prompts()
22 | display_prompt_eng()
23 | with split_embed:
24 | get_models()
25 | get_databases()
26 | get_oci()
27 | display_split_embed()
28 |
29 |
30 | if __name__ == "__main__" or "page.py" in inspect.stack()[1].filename:
31 | main()
32 |
--------------------------------------------------------------------------------
/helm/templates/client/configmap.yaml:
--------------------------------------------------------------------------------
1 | ## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | ## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3 | # spell-checker: ignore nindent
4 |
5 | {{- if .Values.client.enabled }}
6 | apiVersion: v1
7 | kind: ConfigMap
8 | metadata:
9 | name: {{ include "global.fullname" . }}-st-config
10 | labels:
11 | app.kubernetes.io/component: client
12 | {{- include "global.labels" . | nindent 4}}
13 | data:
14 | config.toml: |
15 | [global]
16 | disableWidgetStateDuplicationWarning = true
17 |
18 | [browser]
19 | gatherUsageStats = false
20 | serverAddress = "0.0.0.0"
21 |
22 | [server]
23 | port = "8501"
24 | cookieSecret = "{{ randAlphaNum 32 | b64enc }}"
25 | headless = true
26 | fileWatcherType = "none"
27 | {{- $path := include "global.getPath" . }}
28 | {{- if ne $path "/" }}
29 | baseUrlPath = {{ include "global.getPath" . | quote }}
30 | {{- end }}
31 |
32 | [client]
33 | toolbarMode = "minimal"
34 | {{ end -}}
--------------------------------------------------------------------------------
/opentofu/module_network.tf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3 | # spell-checker: disable
4 |
5 | variable "byo_vcn_ocid" {
6 | description = "Bring Your Own Virtual Cloud Network - VCN OCID"
7 | type = string
8 | default = ""
9 | }
10 |
11 | variable "byo_public_subnet_ocid" {
12 | description = "Bring Your Own Virtual Cloud Network - Pubic Subnet OCID"
13 | type = string
14 | default = ""
15 | }
16 |
17 | variable "byo_private_subnet_ocid" {
18 | description = "Bring Your Own Virtual Cloud Network - Private Subnet OCID"
19 | type = string
20 | default = ""
21 | }
22 |
23 | module "network" {
24 | for_each = var.byo_vcn_ocid == "" ? { managed = true } : {}
25 | source = "./modules/network"
26 | compartment_id = local.compartment_ocid
27 | label_prefix = local.label_prefix
28 | infra = var.infrastructure
29 | oci_services = data.oci_core_services.core_services.services.0
30 |
31 | }
--------------------------------------------------------------------------------
/opentofu/modules/kubernetes/cfgmgt_optimizer.tf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2 | # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3 | # spell-checker: disable
4 |
5 | locals {
6 | optimizer_values = templatefile("${path.module}/templates/ai-optimizer-values.yaml", {
7 | label = var.label_prefix
8 | repository_base = local.repository_base
9 | oci_region = var.region
10 | db_type = var.db_conn.db_type
11 | db_ocid = var.db_ocid
12 | db_dsn = var.db_conn.service
13 | db_name = lower(var.db_name)
14 | node_pool_gpu_deploy = var.node_pool_gpu_deploy
15 | lb_ip = var.lb.ip_address_details[0].ip_address
16 | })
17 | }
18 |
19 | resource "local_sensitive_file" "optimizer_values" {
20 | count = var.deploy_optimizer ? 1 : 0
21 | content = local.optimizer_values
22 | filename = "${path.root}/cfgmgt/stage/ai-optimizer-values.yaml"
23 | file_permission = 0600
24 | }
--------------------------------------------------------------------------------
/src/client/spring_ai/src/main/java/org/springframework/ai/openai/samples/helloworld/model/ChatRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (c) 2024, 2025, Oracle and/or its affiliates.
3 | Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
4 | */
5 | package org.springframework.ai.openai.samples.helloworld.model;
6 |
7 |
8 | import java.util.List;
9 | import java.util.Map;
10 |
11 | public class ChatRequest {
12 | private String model;
13 | private List