├── .vercelignore ├── apps ├── studio │ ├── public │ │ ├── .gitkeep │ │ ├── logo.png │ │ └── favicon.ico │ ├── src │ │ ├── app │ │ │ ├── (dashboard) │ │ │ │ ├── chat │ │ │ │ │ ├── __components__ │ │ │ │ │ │ ├── chat_history │ │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ │ └── chat_list_item.tsx │ │ │ │ │ │ └── topbar_actions.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── api │ │ │ │ │ └── hello │ │ │ │ │ │ └── route.ts │ │ │ │ ├── page.tsx │ │ │ │ ├── telemetry │ │ │ │ │ └── requests │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ ├── context.tsx │ │ │ │ │ │ ├── page.tsx │ │ │ │ │ │ └── utils.ts │ │ │ │ ├── experiments │ │ │ │ │ ├── [expName] │ │ │ │ │ │ ├── notebooks │ │ │ │ │ │ │ ├── [notebookName] │ │ │ │ │ │ │ │ └── __components__ │ │ │ │ │ │ │ │ │ ├── types.ts │ │ │ │ │ │ │ │ │ ├── row │ │ │ │ │ │ │ │ │ ├── empty.tsx │ │ │ │ │ │ │ │ │ ├── table │ │ │ │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ │ │ │ └── textbox.tsx │ │ │ │ │ │ │ │ │ └── notebook.tsx │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── evals │ │ │ │ │ │ │ ├── page.tsx │ │ │ │ │ │ │ └── [evalName] │ │ │ │ │ │ │ │ ├── test_result_table.tsx │ │ │ │ │ │ │ │ ├── topbar_action.tsx │ │ │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── labs │ │ │ │ │ ├── [labId] │ │ │ │ │ │ ├── __components__ │ │ │ │ │ │ │ ├── constants.ts │ │ │ │ │ │ │ └── table_row.tsx │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── page.tsx │ │ │ │ ├── settings │ │ │ │ │ ├── account_section.tsx │ │ │ │ │ └── page.tsx │ │ │ │ └── layout.tsx │ │ │ ├── global.css │ │ │ ├── layout.tsx │ │ │ └── api │ │ │ │ └── palico │ │ │ │ └── route.ts │ │ ├── services │ │ │ ├── health_check.ts │ │ │ ├── auth │ │ │ │ └── index.ts │ │ │ ├── agent.ts │ │ │ └── metadata.ts │ │ ├── hooks │ │ │ └── use_params.ts │ │ ├── types │ │ │ ├── component_types.ts │ │ │ └── common.ts │ │ ├── components │ │ │ ├── layout │ │ │ │ └── sidebar_menu.tsx │ │ │ └── table │ │ │ │ └── test_cell_conversation_id.tsx │ │ ├── constants │ │ │ └── query_keys.ts │ │ ├── context │ │ │ ├── react_query.tsx │ │ │ └── dashboard_layout.tsx │ │ ├── utils │ │ │ └── requests.ts │ │ └── middleware.ts │ ├── package.json │ ├── index.d.ts │ ├── next-env.d.ts │ ├── jest.config.ts │ ├── tsconfig.spec.json │ ├── .eslintrc.json │ ├── tsconfig.json │ ├── Dockerfile │ ├── next.config.js │ ├── README.md │ └── project.json ├── website │ ├── public │ │ ├── .gitkeep │ │ ├── favicon.ico │ │ ├── logos │ │ │ ├── azure.png │ │ │ ├── bedrock.png │ │ │ ├── chroma.png │ │ │ ├── cohere.png │ │ │ ├── palico.png │ │ │ ├── portkey.png │ │ │ ├── anthropic.png │ │ │ ├── langchain.png │ │ │ ├── pinecone.png │ │ │ ├── postgres.png │ │ │ ├── google_cloud.png │ │ │ ├── llamaindex.png │ │ │ └── microsoft.svg │ │ └── landing_page │ │ │ ├── dev.png │ │ │ ├── header.png │ │ │ ├── experiment.png │ │ │ ├── prototype.png │ │ │ ├── combinations.png │ │ │ └── studio │ │ │ └── chat.png │ ├── src │ │ ├── services │ │ │ ├── types.d.ts │ │ │ └── ghost.ts │ │ ├── app │ │ │ ├── api │ │ │ │ └── hello │ │ │ │ │ └── route.ts │ │ │ ├── (marketing) │ │ │ │ ├── __components__ │ │ │ │ │ ├── evaluation │ │ │ │ │ │ ├── analyze.gif │ │ │ │ │ │ └── evaluation.gif │ │ │ │ │ ├── constants │ │ │ │ │ │ └── index.ts │ │ │ │ │ ├── palico_studio │ │ │ │ │ │ ├── control_panel_card.tsx │ │ │ │ │ │ └── slide.tsx │ │ │ │ │ ├── getting_started │ │ │ │ │ │ └── cookbook_card.tsx │ │ │ │ │ └── header │ │ │ │ │ │ └── typescript_icon.tsx │ │ │ │ └── page.tsx │ │ │ ├── global.css │ │ │ ├── context │ │ │ │ └── react_query.tsx │ │ │ └── layout.tsx │ │ ├── utils │ │ │ └── cdn.ts │ │ └── components │ │ │ └── footer │ │ │ └── index.tsx │ ├── index.d.ts │ ├── project.json │ ├── next-env.d.ts │ ├── README.md │ ├── jest.config.ts │ ├── tsconfig.spec.json │ ├── .eslintrc.json │ ├── next.config.js │ └── tsconfig.json ├── tsplay │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── instrumentation.ts │ │ └── main.ts │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── jest.config.ts │ ├── .eslintrc.json │ └── tsconfig.json └── docs │ ├── .eslintrc.json │ ├── favicon.png │ ├── logo │ ├── logo.png │ └── palico.png │ ├── api-reference │ ├── endpoint │ │ ├── get.mdx │ │ ├── create.mdx │ │ └── delete.mdx │ └── introduction.mdx │ ├── images │ ├── checks-passed.png │ └── studio │ │ ├── chat_ui.png │ │ ├── eval_list.png │ │ ├── new_eval.png │ │ ├── quicklab.png │ │ ├── eval_result.png │ │ ├── trace_view.png │ │ ├── eval_compare.png │ │ └── experiment_list.png │ ├── package-lock.json │ ├── client-sdk │ └── api │ │ ├── agent │ │ ├── new_conversation.mdx │ │ └── conversation_reply.mdx │ │ └── introduction.mdx │ ├── README.md │ ├── guides │ └── prompt_management.mdx │ ├── integrations │ ├── vector_db.mdx │ └── llamaindex.mdx │ ├── snippets │ ├── snippet-intro.mdx │ ├── code │ │ ├── generate_service_key.mdx │ │ └── agent_with_memory.mdx │ └── client_sdk │ │ └── tool_execution.mdx │ ├── project.json │ ├── essentials │ └── code.mdx │ └── quickstart.mdx ├── .nxignore ├── .eslintignore ├── .prettierignore ├── packages ├── cli │ ├── templates │ │ └── starter │ │ │ ├── palico.json │ │ │ ├── template..env │ │ │ ├── template..gitignore │ │ │ ├── src │ │ │ ├── agents │ │ │ │ ├── types.ts │ │ │ │ └── chat_with_tools │ │ │ │ │ ├── tools.ts │ │ │ │ │ └── types.ts │ │ │ ├── main.ts │ │ │ └── utils │ │ │ │ └── openai.ts │ │ │ ├── template.tsconfig.json │ │ │ └── template.package.json │ ├── README.md │ ├── tsconfig.lib.json │ ├── tsconfig.spec.json │ ├── jest.config.ts │ ├── src │ │ ├── init │ │ │ └── templates.ts │ │ └── index.ts │ ├── tsconfig.json │ ├── package.json │ ├── .eslintrc.json │ └── project.json ├── components │ ├── src │ │ ├── hooks │ │ │ ├── index.ts │ │ │ └── useDialogController.ts │ │ ├── layouts │ │ │ └── index.ts │ │ ├── chip │ │ │ └── index.ts │ │ ├── server.ts │ │ ├── dialog │ │ │ ├── index.ts │ │ │ ├── dialog.tsx │ │ │ └── prompt_accept_action.tsx │ │ ├── types.ts │ │ ├── table │ │ │ ├── types.ts │ │ │ ├── index.ts │ │ │ ├── hooks.ts │ │ │ ├── render_cell.tsx │ │ │ └── control_panel │ │ │ │ └── option_drawer.tsx │ │ ├── typography │ │ │ ├── index.tsx │ │ │ └── error.tsx │ │ ├── theme │ │ │ ├── functions │ │ │ │ ├── pxToRem.ts │ │ │ │ ├── hexToRgb.ts │ │ │ │ ├── linearGradient.ts │ │ │ │ ├── rgba.ts │ │ │ │ ├── index.ts │ │ │ │ ├── boxShadow.ts │ │ │ │ └── gradientChartLine.ts │ │ │ ├── index.tsx │ │ │ └── colors.ts │ │ ├── list │ │ │ └── index.tsx │ │ ├── form │ │ │ ├── index.tsx │ │ │ ├── form.tsx │ │ │ ├── file_upload.tsx │ │ │ └── simple_dialog_form.tsx │ │ ├── card │ │ │ └── index.tsx │ │ ├── embed │ │ │ └── index.tsx │ │ ├── index.ts │ │ ├── link │ │ │ └── index.tsx │ │ ├── loading │ │ │ └── index.tsx │ │ ├── accordion_list │ │ │ └── index.tsx │ │ ├── button │ │ │ └── index.tsx │ │ └── menu_button │ │ │ └── index.tsx │ ├── package.json │ ├── README.md │ ├── tsconfig.json │ ├── .eslintrc.json │ ├── tsconfig.lib.json │ └── project.json ├── palico-app │ ├── src │ │ ├── app_scripts │ │ │ ├── index.ts │ │ │ ├── app_script.ts │ │ │ ├── executor.ts │ │ │ └── model.ts │ │ ├── data_store │ │ │ └── index.ts │ │ ├── experiments │ │ │ ├── test_suite │ │ │ │ ├── index.ts │ │ │ │ ├── create_test.ts │ │ │ │ └── model.ts │ │ │ ├── metrics │ │ │ │ ├── common.ts │ │ │ │ ├── index.ts │ │ │ │ ├── leven.ts │ │ │ │ ├── exact_match.ts │ │ │ │ └── json.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── workflows │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── agent │ │ │ ├── chat │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── model.ts │ │ ├── tracing │ │ │ ├── index.ts │ │ │ ├── start_tracer.ts │ │ │ └── public.span.ts │ │ ├── utils │ │ │ ├── common.ts │ │ │ ├── app_services │ │ │ │ └── common.ts │ │ │ ├── api.ts │ │ │ ├── scripts.ts │ │ │ └── environment.ts │ │ ├── api │ │ │ ├── types.ts │ │ │ ├── handlers.ts │ │ │ ├── routes │ │ │ │ ├── metadata │ │ │ │ │ └── index.ts │ │ │ │ ├── studio │ │ │ │ │ └── index.ts │ │ │ │ ├── telemetry │ │ │ │ │ └── index.ts │ │ │ │ └── agent │ │ │ │ │ └── index.ts │ │ │ ├── middlewares │ │ │ │ ├── local_authorizer.ts │ │ │ │ └── default_error_middeware.ts │ │ │ └── error.ts │ │ ├── types.ts │ │ ├── index.ts │ │ ├── assets │ │ │ ├── selfhost │ │ │ │ ├── Dockerfile │ │ │ │ └── selfhost.env │ │ │ └── postinstall.ts │ │ ├── cli │ │ │ ├── update │ │ │ │ └── index.ts │ │ │ ├── __root__ │ │ │ │ └── index.ts │ │ │ ├── generate │ │ │ │ ├── index.ts │ │ │ │ └── generate_token.ts │ │ │ ├── index.ts │ │ │ └── selfhost │ │ │ │ └── index.ts │ │ ├── config │ │ │ └── index.ts │ │ ├── services │ │ │ └── job_queue │ │ │ │ └── workers.ts │ │ ├── test_utils │ │ │ └── mock_agent.ts │ │ └── models │ │ │ └── workflow.ts │ ├── .gitignore │ ├── typedoc.json │ ├── prisma │ │ └── migrations │ │ │ ├── migration_lock.toml │ │ │ ├── 20241013031943_20241012231940 │ │ │ └── migration.sql │ │ │ ├── 20240925183549_20240925143546 │ │ │ └── migration.sql │ │ │ └── 20240923175711_20240923135708 │ │ │ └── migration.sql │ ├── tsconfig.lib.json │ ├── scripts │ │ └── database │ │ │ ├── docker-compose.yml │ │ │ └── sync_db.ts │ ├── tsconfig.spec.json │ ├── jest.config.ts │ ├── tsconfig.json │ └── .eslintrc.json ├── react │ ├── src │ │ └── index.ts │ ├── README.md │ ├── .babelrc │ ├── jest.config.ts │ ├── tsconfig.json │ ├── tsconfig.spec.json │ ├── package.json │ ├── .eslintrc.json │ └── tsconfig.lib.json ├── client-js │ ├── README.md │ ├── typedoc.json │ ├── src │ │ ├── index.ts │ │ ├── types.ts │ │ └── create_client.ts │ ├── tsconfig.lib.json │ ├── tsconfig.spec.json │ ├── jest.config.ts │ ├── tsconfig.json │ ├── .eslintrc.json │ └── package.json └── common │ ├── src │ ├── constants │ │ └── index.ts │ ├── utils │ │ ├── utils.ts │ │ ├── index.ts │ │ ├── validators.ts │ │ └── jwt.ts │ ├── index.ts │ ├── types │ │ ├── index.ts │ │ ├── common.ts │ │ └── app_script.ts │ └── config │ │ └── index.ts │ ├── typedoc.json │ ├── README.md │ ├── tsconfig.lib.json │ ├── tsconfig.spec.json │ ├── jest.config.ts │ ├── .eslintrc.json │ ├── tsconfig.json │ └── package.json ├── .prettierrc ├── .npmrc ├── typedoc.base.json ├── jest.preset.js ├── .vscode └── extensions.json ├── jest.config.ts ├── .dockerignore ├── SECURITY.md ├── scripts └── deploy_to_local_npm.sh ├── typedoc.json ├── .template.env ├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── FUNDING.yml └── workflows │ ├── ci.yml │ └── publish.yml ├── .verdaccio └── config.yml ├── .gitignore ├── docker └── dev │ └── docker-compose.yml ├── tsconfig.base.json ├── .eslintrc.base.json ├── .eslintrc.json ├── LICENSE └── project.json /.vercelignore: -------------------------------------------------------------------------------- 1 | dist -------------------------------------------------------------------------------- /apps/studio/public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/website/public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/tsplay/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.nxignore: -------------------------------------------------------------------------------- 1 | .next 2 | **/.next 3 | apps/docs -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | **/*/typedoc/*.js -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .prettierignore 2 | .docusaurus/ -------------------------------------------------------------------------------- /packages/cli/templates/starter/palico.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true 3 | } 4 | -------------------------------------------------------------------------------- /apps/docs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "ignorePatterns": ["**/*"] 3 | } 4 | -------------------------------------------------------------------------------- /apps/studio/src/app/(dashboard)/chat/__components__/chat_history/types.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/website/src/services/types.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@tryghost/admin-api'; 2 | -------------------------------------------------------------------------------- /packages/components/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './useDialogController' -------------------------------------------------------------------------------- /packages/components/src/layouts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './simple_list_view' -------------------------------------------------------------------------------- /packages/palico-app/src/app_scripts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app_script'; 2 | -------------------------------------------------------------------------------- /packages/cli/templates/starter/template..env: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY="" -------------------------------------------------------------------------------- /packages/palico-app/src/data_store/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat_history'; 2 | -------------------------------------------------------------------------------- /apps/studio/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "start": "next start" 4 | } 5 | } -------------------------------------------------------------------------------- /packages/components/src/chip/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | Chip, 3 | } from '@mui/material' -------------------------------------------------------------------------------- /packages/react/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use_chat'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org/ 2 | @palico-ai:registry=https://registry.npmjs.org -------------------------------------------------------------------------------- /packages/cli/README.md: -------------------------------------------------------------------------------- 1 | # Palico CLI 2 | 3 | :::note 4 | Documentation in progress 5 | ::: -------------------------------------------------------------------------------- /packages/palico-app/src/experiments/test_suite/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create_test'; 2 | -------------------------------------------------------------------------------- /apps/docs/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/favicon.png -------------------------------------------------------------------------------- /packages/palico-app/src/workflows/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | export * from './workflow' -------------------------------------------------------------------------------- /apps/docs/logo/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/logo/logo.png -------------------------------------------------------------------------------- /packages/components/src/server.ts: -------------------------------------------------------------------------------- 1 | export const HelloServer = () => { 2 | return "Hello Server!" 3 | }; -------------------------------------------------------------------------------- /apps/docs/api-reference/endpoint/get.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Get Plants' 3 | openapi: 'GET /plants' 4 | --- 5 | -------------------------------------------------------------------------------- /apps/docs/logo/palico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/logo/palico.png -------------------------------------------------------------------------------- /apps/studio/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/studio/public/logo.png -------------------------------------------------------------------------------- /packages/cli/templates/starter/template..gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .palico 4 | .DS_Store 5 | .env -------------------------------------------------------------------------------- /packages/client-js/README.md: -------------------------------------------------------------------------------- 1 | # Client SDK 2 | 3 | :::warning 4 | Documentation under construction 5 | ::: -------------------------------------------------------------------------------- /packages/common/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | export const API_STREAM_CONTENT_PREFIX = '__PALICO_STREAM__:'; 2 | -------------------------------------------------------------------------------- /packages/components/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@palico-ai/components", 3 | "version": "0.0.1" 4 | } 5 | -------------------------------------------------------------------------------- /apps/docs/api-reference/endpoint/create.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create Plant' 3 | openapi: 'POST /plants' 4 | --- 5 | -------------------------------------------------------------------------------- /packages/components/src/dialog/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dialog'; 2 | export * from './prompt_accept_action'; 3 | -------------------------------------------------------------------------------- /packages/components/src/types.ts: -------------------------------------------------------------------------------- 1 | export interface ComponentWithChildren { 2 | children: React.ReactNode 3 | } -------------------------------------------------------------------------------- /packages/palico-app/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | # Keep environment variables out of version control 3 | .env 4 | -------------------------------------------------------------------------------- /typedoc.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://typedoc.org/schema.json", 3 | "includeVersion": true 4 | } 5 | -------------------------------------------------------------------------------- /apps/studio/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/studio/public/favicon.ico -------------------------------------------------------------------------------- /apps/website/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/favicon.ico -------------------------------------------------------------------------------- /jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nx/jest/preset').default; 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /packages/common/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["src/index.ts"], 3 | "tsconfig": "tsconfig.lib.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/palico-app/src/agent/chat/index.ts: -------------------------------------------------------------------------------- 1 | export * from './stream'; 2 | export * from './chat_request_handler'; 3 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["esbenp.prettier-vscode", "firsttris.vscode-jest-runner"] 3 | } 4 | -------------------------------------------------------------------------------- /apps/docs/api-reference/endpoint/delete.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete Plant' 3 | openapi: 'DELETE /plants/{id}' 4 | --- 5 | -------------------------------------------------------------------------------- /apps/docs/images/checks-passed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/images/checks-passed.png -------------------------------------------------------------------------------- /packages/client-js/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["src/index.ts"], 3 | "tsconfig": "tsconfig.lib.json" 4 | } 5 | -------------------------------------------------------------------------------- /packages/palico-app/typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": ["src/index.ts"], 3 | "tsconfig": "tsconfig.lib.json" 4 | } 5 | -------------------------------------------------------------------------------- /apps/docs/images/studio/chat_ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/images/studio/chat_ui.png -------------------------------------------------------------------------------- /apps/docs/images/studio/eval_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/images/studio/eval_list.png -------------------------------------------------------------------------------- /apps/docs/images/studio/new_eval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/images/studio/new_eval.png -------------------------------------------------------------------------------- /apps/docs/images/studio/quicklab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/images/studio/quicklab.png -------------------------------------------------------------------------------- /apps/website/public/logos/azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/azure.png -------------------------------------------------------------------------------- /apps/website/public/logos/bedrock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/bedrock.png -------------------------------------------------------------------------------- /apps/website/public/logos/chroma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/chroma.png -------------------------------------------------------------------------------- /apps/website/public/logos/cohere.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/cohere.png -------------------------------------------------------------------------------- /apps/website/public/logos/palico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/palico.png -------------------------------------------------------------------------------- /apps/website/public/logos/portkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/portkey.png -------------------------------------------------------------------------------- /packages/palico-app/src/experiments/metrics/common.ts: -------------------------------------------------------------------------------- 1 | export interface EvalMetricCommonParams { 2 | label?: string; 3 | } 4 | -------------------------------------------------------------------------------- /apps/docs/images/studio/eval_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/images/studio/eval_result.png -------------------------------------------------------------------------------- /apps/docs/images/studio/trace_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/images/studio/trace_view.png -------------------------------------------------------------------------------- /apps/website/public/logos/anthropic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/anthropic.png -------------------------------------------------------------------------------- /apps/website/public/logos/langchain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/langchain.png -------------------------------------------------------------------------------- /apps/website/public/logos/pinecone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/pinecone.png -------------------------------------------------------------------------------- /apps/website/public/logos/postgres.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/postgres.png -------------------------------------------------------------------------------- /jest.config.ts: -------------------------------------------------------------------------------- 1 | import { getJestProjects } from '@nx/jest'; 2 | 3 | export default { 4 | projects: getJestProjects(), 5 | }; 6 | -------------------------------------------------------------------------------- /packages/common/src/utils/utils.ts: -------------------------------------------------------------------------------- 1 | export const wait = (ms: number) => 2 | new Promise((resolve) => setTimeout(resolve, ms)); 3 | -------------------------------------------------------------------------------- /packages/components/src/table/types.ts: -------------------------------------------------------------------------------- 1 | export interface TableColumnMeta { 2 | filterVariant?: 'text' | 'range' | 'select'; 3 | } -------------------------------------------------------------------------------- /apps/docs/images/studio/eval_compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/images/studio/eval_compare.png -------------------------------------------------------------------------------- /apps/docs/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mintdocs", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": {} 6 | } 7 | -------------------------------------------------------------------------------- /apps/website/public/landing_page/dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/landing_page/dev.png -------------------------------------------------------------------------------- /apps/website/public/logos/google_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/google_cloud.png -------------------------------------------------------------------------------- /apps/website/public/logos/llamaindex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/logos/llamaindex.png -------------------------------------------------------------------------------- /packages/palico-app/src/experiments/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | export * from './metrics'; 3 | export * from './test_suite'; 4 | -------------------------------------------------------------------------------- /packages/palico-app/src/tracing/index.ts: -------------------------------------------------------------------------------- 1 | import './start_tracer'; 2 | export * from './public.span'; 3 | export * from './logger'; 4 | -------------------------------------------------------------------------------- /apps/docs/images/studio/experiment_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/docs/images/studio/experiment_list.png -------------------------------------------------------------------------------- /apps/website/public/landing_page/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/landing_page/header.png -------------------------------------------------------------------------------- /apps/website/src/app/api/hello/route.ts: -------------------------------------------------------------------------------- 1 | export async function GET(request: Request) { 2 | return new Response('Hello, from API!'); 3 | } 4 | -------------------------------------------------------------------------------- /packages/components/src/typography/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './typography'; 2 | export * from './error'; 3 | export * from './markdown'; 4 | -------------------------------------------------------------------------------- /apps/website/public/landing_page/experiment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/landing_page/experiment.png -------------------------------------------------------------------------------- /apps/website/public/landing_page/prototype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/landing_page/prototype.png -------------------------------------------------------------------------------- /apps/studio/src/app/(dashboard)/api/hello/route.ts: -------------------------------------------------------------------------------- 1 | export async function GET(request: Request) { 2 | return new Response('Hello, from API!'); 3 | } 4 | -------------------------------------------------------------------------------- /apps/website/public/landing_page/combinations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/landing_page/combinations.png -------------------------------------------------------------------------------- /apps/website/public/landing_page/studio/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/public/landing_page/studio/chat.png -------------------------------------------------------------------------------- /packages/common/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | export * from './utils'; 3 | export * from './config'; 4 | export * from './constants'; 5 | -------------------------------------------------------------------------------- /packages/palico-app/src/utils/common.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | export const uuid = () => { 4 | return crypto.randomUUID(); 5 | }; 6 | -------------------------------------------------------------------------------- /packages/client-js/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create_client'; 2 | export * from './types'; 3 | export * from './request'; 4 | export * from './utils'; 5 | -------------------------------------------------------------------------------- /packages/common/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './jwt'; 2 | export * from './validators'; 3 | export * from './utils'; 4 | export * from './stream'; 5 | -------------------------------------------------------------------------------- /packages/components/src/table/index.ts: -------------------------------------------------------------------------------- 1 | export * from './table'; 2 | export * from './types'; 3 | export * from './hooks'; 4 | export * from './render_cell'; 5 | -------------------------------------------------------------------------------- /packages/palico-app/src/utils/app_services/common.ts: -------------------------------------------------------------------------------- 1 | export enum ProjectService { 2 | POSTGRES_DB = 'postgres_db', 3 | STUDIO = 'studio', 4 | API = 'api', 5 | } 6 | -------------------------------------------------------------------------------- /packages/components/src/theme/functions/pxToRem.ts: -------------------------------------------------------------------------------- 1 | export default function pxToRem (value: number, baseNumber = 16): string { 2 | return `${value / baseNumber}rem`; 3 | } 4 | -------------------------------------------------------------------------------- /packages/cli/templates/starter/src/agents/types.ts: -------------------------------------------------------------------------------- 1 | // config value / feature-flags that can be passed to the agent 2 | export interface AppConfig { 3 | model?: string; 4 | } 5 | -------------------------------------------------------------------------------- /packages/palico-app/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (i.e. Git) 3 | provider = "postgresql" -------------------------------------------------------------------------------- /packages/palico-app/src/api/types.ts: -------------------------------------------------------------------------------- 1 | export interface ConversationIDRequired { 2 | conversationId: string; 3 | } 4 | 5 | export interface RequestIDRequired { 6 | requestId: string; 7 | } -------------------------------------------------------------------------------- /apps/website/src/app/(marketing)/__components__/evaluation/analyze.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/src/app/(marketing)/__components__/evaluation/analyze.gif -------------------------------------------------------------------------------- /apps/docs/client-sdk/api/agent/new_conversation.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: "New Conversation" 3 | description: "Start a new conversation with an agent." 4 | openapi: post /agent/{agentName}/conversation 5 | --- -------------------------------------------------------------------------------- /apps/website/src/app/(marketing)/__components__/evaluation/evaluation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code/app-palico-ai/main/apps/website/src/app/(marketing)/__components__/evaluation/evaluation.gif -------------------------------------------------------------------------------- /apps/studio/src/app/global.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0 !important; 3 | } 4 | 5 | :root { 6 | color-scheme: dark; 7 | /* background-color: rgb(24, 24, 27); */ 8 | /* background-color: #09090b */ 9 | } -------------------------------------------------------------------------------- /packages/components/src/theme/functions/hexToRgb.ts: -------------------------------------------------------------------------------- 1 | import chroma from 'chroma-js'; 2 | 3 | export default function hexToRgb (color: string): string { 4 | return chroma(color).rgb().join(', '); 5 | } 6 | -------------------------------------------------------------------------------- /packages/palico-app/src/experiments/metrics/index.ts: -------------------------------------------------------------------------------- 1 | export * from './contains'; 2 | export * from './json'; 3 | export * from './exact_match'; 4 | export * from './rouge'; 5 | export * from './leven'; 6 | -------------------------------------------------------------------------------- /apps/studio/index.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | declare module '*.svg' { 3 | const content: any; 4 | export const ReactComponent: any; 5 | export default content; 6 | } 7 | -------------------------------------------------------------------------------- /apps/docs/README.md: -------------------------------------------------------------------------------- 1 | # Palico Docs 2 | 3 | This repo is built on top of Mintlify. 4 | 5 | ### Development 6 | 7 | Run the following command to start your docs : 8 | 9 | ``` 10 | nx run docs 11 | ``` 12 | -------------------------------------------------------------------------------- /apps/website/index.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | declare module '*.svg' { 3 | const content: any; 4 | export const ReactComponent: any; 5 | export default content; 6 | } 7 | -------------------------------------------------------------------------------- /packages/palico-app/src/agent/index.ts: -------------------------------------------------------------------------------- 1 | export * from './agent'; 2 | export * from './chat'; 3 | export { 4 | ToolCall, 5 | ToolCallResult, 6 | Tool, 7 | IntermediateStep, 8 | } from '@palico-ai/common'; 9 | -------------------------------------------------------------------------------- /packages/react/README.md: -------------------------------------------------------------------------------- 1 | # react 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test react` to execute the unit tests via [Jest](https://jestjs.io). 8 | -------------------------------------------------------------------------------- /apps/docs/client-sdk/api/agent/conversation_reply.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Conversation Reply" 3 | description: "Reply to a conversation with an agent." 4 | openapi: post /agent/{agentName}/conversation/{conversationId}/reply 5 | --- -------------------------------------------------------------------------------- /apps/studio/src/app/(dashboard)/page.tsx: -------------------------------------------------------------------------------- 1 | import { redirect } from 'next/navigation'; 2 | import { RoutePath } from '../../utils/route_path'; 3 | 4 | export default function Index() { 5 | redirect(RoutePath.chat()); 6 | } 7 | -------------------------------------------------------------------------------- /apps/studio/src/app/(dashboard)/telemetry/requests/types.ts: -------------------------------------------------------------------------------- 1 | import { RequestSpan } from '@palico-ai/common'; 2 | 3 | export interface RequestSpanTreeNode extends RequestSpan { 4 | children: RequestSpanTreeNode[]; 5 | } 6 | -------------------------------------------------------------------------------- /packages/components/README.md: -------------------------------------------------------------------------------- 1 | # components 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Running unit tests 6 | 7 | Run `nx test components` to execute the unit tests via [Jest](https://jestjs.io). 8 | -------------------------------------------------------------------------------- /packages/components/src/list/index.tsx: -------------------------------------------------------------------------------- 1 | export { 2 | List, 3 | ListItem, 4 | ListItemText, 5 | ListItemIcon, 6 | ListItemSecondaryAction, 7 | ListSubheader, 8 | ListItemButton, 9 | } from '@mui/material'; 10 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | Dockerfile 4 | **/Dockerfile 5 | .dockerignore 6 | **/.dockerignore 7 | npm-debug.log 8 | README.md 9 | .next 10 | **/.next 11 | docker 12 | .git 13 | .nx 14 | .vercel 15 | .vscode 16 | tmp -------------------------------------------------------------------------------- /packages/components/src/theme/functions/linearGradient.ts: -------------------------------------------------------------------------------- 1 | export default function linearGradient (color: string, colorState: string, angle = 195): string { 2 | return `linear-gradient(${angle}deg, ${color}, ${colorState})`; 3 | } 4 | -------------------------------------------------------------------------------- /packages/components/src/theme/functions/rgba.ts: -------------------------------------------------------------------------------- 1 | import hexToRgb from './hexToRgb'; 2 | 3 | export default function rgba (color: string, opacity: string | number): string { 4 | return `rgba(${hexToRgb(color)}, ${opacity})`; 5 | } 6 | -------------------------------------------------------------------------------- /apps/docs/guides/prompt_management.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Prompt Management" 3 | description: "This guide will help you develop a structured way to manage your prompts" 4 | --- 5 | 6 | This guide is a work in progress. 7 | -------------------------------------------------------------------------------- /apps/website/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "website", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "apps/website", 5 | "projectType": "application", 6 | "targets": {}, 7 | "tags": [] 8 | } 9 | -------------------------------------------------------------------------------- /packages/react/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@nx/react/babel", 5 | { 6 | "runtime": "automatic", 7 | "useBuiltIns": "usage" 8 | } 9 | ] 10 | ], 11 | "plugins": [] 12 | } 13 | -------------------------------------------------------------------------------- /packages/components/src/form/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './file_upload'; 2 | export * from './form_builder'; 3 | export * from './simple_dialog_form'; 4 | export * from './autocomplete'; 5 | export * from './textfield'; 6 | export * from './form'; 7 | -------------------------------------------------------------------------------- /apps/docs/integrations/vector_db.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Vector Database" 3 | description: "Learn how to use a vector database to store and retrieve vectors for your LLM application." 4 | --- 5 | 6 | This guide is a work in progress. 7 | -------------------------------------------------------------------------------- /packages/common/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './agent'; 2 | export * from './studio'; 3 | export * from './experiment'; 4 | export * from './api'; 5 | export * from './telemetry'; 6 | export * from './common'; 7 | export * from './app_script'; 8 | -------------------------------------------------------------------------------- /apps/website/src/app/global.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0 !important; 3 | } 4 | 5 | :root { 6 | color-scheme: dark; 7 | /* background-color: rgb(24, 24, 27); */ 8 | /* background-color: #0d0b10; */ 9 | /* background-color: #09090b; */ 10 | } -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | Currently we only have a single version of this project (v1). For all security concerns, either create a ticket, or email asif@palico.ai. We try our best to resolve all security concerns as soon as they are revealed. 4 | -------------------------------------------------------------------------------- /apps/website/src/app/(marketing)/__components__/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * from './code_snippet'; 2 | 3 | export const ExperimentDemoVideoURL = 4 | 'https://www.loom.com/embed/ac36ce6824c241b891c3bb4c246dfdf4?sid=3be46e46-8fbf-4c74-8bc3-4078372b76fd'; 5 | -------------------------------------------------------------------------------- /apps/studio/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. 6 | -------------------------------------------------------------------------------- /scripts/deploy_to_local_npm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | # client-js 3 | nx run client-js:build 4 | (cd dist/packages/client-js; 5 | npm unpublish --force --registry http://localhost:4873; 6 | npm publish --registry http://localhost:4873 7 | ) 8 | 9 | # palico-app 10 | -------------------------------------------------------------------------------- /apps/website/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. 6 | -------------------------------------------------------------------------------- /packages/palico-app/src/types.ts: -------------------------------------------------------------------------------- 1 | export enum ResponseMetadataKey { 2 | ExecutionTime = 'meta_executionTime', 3 | TotalTokens = 'meta_totalTokens', 4 | InputTokens = 'meta_inputTokens', 5 | OutputTokens = 'meta_outputTokens', 6 | TotalCost = 'meta_totalCost', 7 | } 8 | -------------------------------------------------------------------------------- /packages/palico-app/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './agent'; 2 | export * from './api/error'; 3 | export * from './api'; 4 | export * from './experiments'; 5 | export * from './workflows'; 6 | export * from './data_store'; 7 | export * from './types'; 8 | export * from './tracing'; 9 | -------------------------------------------------------------------------------- /typedoc.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "packages/client-js", 4 | "packages/common", 5 | "packages/palico-app" 6 | ], 7 | "name": "Palico App", 8 | "entryPointStrategy": "packages", 9 | "includeVersion": false, 10 | "out": "dist/typedoc" 11 | } 12 | -------------------------------------------------------------------------------- /apps/studio/src/app/(dashboard)/experiments/[expName]/notebooks/[notebookName]/__components__/types.ts: -------------------------------------------------------------------------------- 1 | import { DatasetMetadata, Evaluation } from '@palico-ai/common'; 2 | 3 | export interface Dataset extends DatasetMetadata { 4 | data: Omit; 5 | } 6 | -------------------------------------------------------------------------------- /packages/common/README.md: -------------------------------------------------------------------------------- 1 | # common 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Building 6 | 7 | Run `nx build common` to build the library. 8 | 9 | ## Running unit tests 10 | 11 | Run `nx test common` to execute the unit tests via [Jest](https://jestjs.io). 12 | -------------------------------------------------------------------------------- /apps/website/public/logos/microsoft.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/cli/templates/starter/src/main.ts: -------------------------------------------------------------------------------- 1 | import { PalicoAPIServer } from '@palico-ai/app'; 2 | 3 | const run = async () => { 4 | console.log('Running Palico API Server'); 5 | const server = PalicoAPIServer.create({ enableDevMode: true }); 6 | await server.start(); 7 | }; 8 | 9 | run(); 10 | -------------------------------------------------------------------------------- /apps/tsplay/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "types": ["node"] 7 | }, 8 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"], 9 | "include": ["src/**/*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/cli/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "types": ["node"] 7 | }, 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/common/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "types": ["node"] 7 | }, 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/docs/snippets/snippet-intro.mdx: -------------------------------------------------------------------------------- 1 | One of the core principles of software development is DRY (Don't Repeat 2 | Yourself). This is a principle that apply to documentation as 3 | well. If you find yourself repeating the same content in multiple places, you 4 | should consider creating a custom snippet to keep your content in sync. 5 | -------------------------------------------------------------------------------- /packages/client-js/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "types": ["node"] 7 | }, 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/common/src/config/index.ts: -------------------------------------------------------------------------------- 1 | import * as dotenv from 'dotenv'; 2 | 3 | dotenv.config(); 4 | 5 | class CommonConfig { 6 | getSecretKey(): string { 7 | const secret = process.env['JWT_SECRET'] ?? 'local-secret'; 8 | return secret; 9 | } 10 | } 11 | 12 | export const commonConfig = new CommonConfig(); 13 | -------------------------------------------------------------------------------- /packages/palico-app/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "declaration": true, 6 | "types": ["node"] 7 | }, 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/docs/integrations/llamaindex.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Llama Index" 3 | description: "Palico provides complete flexibility over the implementation details of your LLM Application, and as such, you can libraries like LlamaIndex to help build your LLM application logic." 4 | --- 5 | 6 | This guide is a work in progress. 7 | -------------------------------------------------------------------------------- /apps/studio/src/app/(dashboard)/telemetry/requests/context.tsx: -------------------------------------------------------------------------------- 1 | import { QueryParam } from '../../../../utils/route_path'; 2 | import { useSearchParams } from 'next/navigation'; 3 | 4 | export const useSelectedRequestId = () => { 5 | const searchParams = useSearchParams(); 6 | return searchParams.get(QueryParam.RequestId); 7 | }; 8 | -------------------------------------------------------------------------------- /apps/studio/src/services/health_check.ts: -------------------------------------------------------------------------------- 1 | 'use server'; 2 | 3 | import { HealthCheckResponse } from '@palico-ai/common'; 4 | import { palicoSDK } from './palico'; 5 | 6 | export const healthCheck = async () => { 7 | const client = await palicoSDK(); 8 | return await client.api.get('/health'); 9 | }; 10 | -------------------------------------------------------------------------------- /packages/palico-app/scripts/database/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | database: 5 | image: 'postgres:15-alpine' 6 | restart: 'always' 7 | environment: 8 | - 'POSTGRES_USER=root' 9 | - 'POSTGRES_PASSWORD=root' 10 | - 'POSTGRES_DB=palico-app' 11 | ports: 12 | - '5432:5432' 13 | -------------------------------------------------------------------------------- /packages/palico-app/src/api/handlers.ts: -------------------------------------------------------------------------------- 1 | import { RequestHandler } from 'express'; 2 | import { HealthCheckResponse } from '@palico-ai/common'; 3 | 4 | export const healthCheckRequestHandler: RequestHandler< 5 | undefined, 6 | HealthCheckResponse 7 | > = async (_, res) => { 8 | return res.status(200).json({ status: 'ok' }); 9 | }; 10 | -------------------------------------------------------------------------------- /apps/studio/src/app/(dashboard)/telemetry/requests/page.tsx: -------------------------------------------------------------------------------- 1 | import React, { Suspense } from 'react'; 2 | import RequestTelemetryApp from './app'; 3 | 4 | const RequestTelemetryPage: React.FC = () => { 5 | return ( 6 | 7 | 8 | 9 | ); 10 | }; 11 | 12 | export default RequestTelemetryPage; 13 | -------------------------------------------------------------------------------- /apps/tsplay/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "src/**/*.test.ts", 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/cli/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "src/**/*.test.ts", 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/client-js/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "src/**/*.test.ts", 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/common/src/types/common.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Represents an Object that can be converted to JSON 3 | */ 4 | export type JSONAbleObject< 5 | T extends Record = Record 6 | > = T; 7 | 8 | export enum JobQueueStatus { 9 | CREATED = 'created', 10 | ACTIVE = 'active', 11 | FAILED = 'failed', 12 | SUCCESS = 'success', 13 | } 14 | -------------------------------------------------------------------------------- /packages/common/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "src/**/*.test.ts", 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/palico-app/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "src/**/*.test.ts", 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /.template.env: -------------------------------------------------------------------------------- 1 | DATABASE_URL="postgres://root:root@localhost:5432/palico-app" 2 | DEV_MODE=true 3 | JWT_SECRET="secret" 4 | STUDIO_USERNAME="admin" 5 | STUDIO_PASSWORD="password" 6 | PALICO_AGENT_API_URL="http://localhost:8000" 7 | PALICO_SERVICE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYWRtaW4iLCJpYXQiOjE3MTM4MDg3NzB9.GEskObwga-XXXvTM8V6v2d27RNb9-Y8em0Kim5Zazpg" 8 | -------------------------------------------------------------------------------- /packages/cli/templates/starter/src/utils/openai.ts: -------------------------------------------------------------------------------- 1 | import OpenAI from 'openai'; 2 | 3 | export const getOpenAIClient = () => { 4 | const apiKey = process.env.OPENAI_API_KEY; 5 | if (!apiKey) { 6 | throw new Error('OPENAI_API_KEY is not set'); 7 | } 8 | const client = new OpenAI({ 9 | apiKey: process.env.OPENAI_API_KEY, 10 | }); 11 | 12 | return client; 13 | }; 14 | -------------------------------------------------------------------------------- /apps/website/src/services/ghost.ts: -------------------------------------------------------------------------------- 1 | 'use server'; 2 | import GhostAdminAPI from '@tryghost/admin-api'; 3 | 4 | export const subscribeToBlog = async (email: string) => { 5 | const api = new GhostAdminAPI({ 6 | url: process.env.GHOST_API_URL, 7 | key: process.env.GHOST_API_KEY, 8 | version: 'v5.0', 9 | }); 10 | await api.members.add({ 11 | email, 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /apps/tsplay/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'tsplay', 4 | preset: '../../jest.preset.js', 5 | testEnvironment: 'node', 6 | transform: { 7 | '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], 8 | }, 9 | moduleFileExtensions: ['ts', 'js', 'html'], 10 | coverageDirectory: '../../coverage/apps/tsplay', 11 | }; 12 | -------------------------------------------------------------------------------- /packages/cli/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'cli', 4 | preset: '../../jest.preset.js', 5 | testEnvironment: 'node', 6 | transform: { 7 | '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], 8 | }, 9 | moduleFileExtensions: ['ts', 'js', 'html'], 10 | coverageDirectory: '../../coverage/packages/cli', 11 | }; 12 | -------------------------------------------------------------------------------- /packages/cli/src/init/templates.ts: -------------------------------------------------------------------------------- 1 | import * as chalk from 'chalk'; 2 | 3 | export const StarterTemplateNextSteps = (projectName: string) => [ 4 | `Navigate to the project directory: ${chalk.greenBright( 5 | `cd ${projectName}` 6 | )}`, 7 | `Update ${chalk.greenBright('.env')} with your OpenAI API key`, 8 | `Run ${chalk.greenBright('npm start')} to start the application`, 9 | ]; 10 | -------------------------------------------------------------------------------- /apps/docs/snippets/code/generate_service_key.mdx: -------------------------------------------------------------------------------- 1 | You can generate a service key from your Palico App project directory 2 | 3 | 4 | ```bash 5 | npm run palico generate apikey 6 | ``` 7 | 8 | 9 | ```bash 10 | npm run palico generate apikey -s 11 | ``` 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/common/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'common', 4 | preset: '../../jest.preset.js', 5 | testEnvironment: 'node', 6 | transform: { 7 | '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], 8 | }, 9 | moduleFileExtensions: ['ts', 'js', 'html'], 10 | coverageDirectory: '../../coverage/packages/common', 11 | }; 12 | -------------------------------------------------------------------------------- /packages/client-js/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'client-js', 4 | preset: '../../jest.preset.js', 5 | testEnvironment: 'node', 6 | transform: { 7 | '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], 8 | }, 9 | moduleFileExtensions: ['ts', 'js', 'html'], 10 | coverageDirectory: '../../coverage/packages/client-js', 11 | }; 12 | -------------------------------------------------------------------------------- /apps/tsplay/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../../.eslintrc.base.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /packages/components/src/form/form.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { PropsOf } from '@emotion/react'; 3 | 4 | export const Form: React.FC> = ({ onSubmit, ...rest }) => { 5 | const handleSubmit = (e: React.FormEvent): void => { 6 | e.preventDefault(); 7 | if (onSubmit) onSubmit(e); 8 | }; 9 | 10 | return
; 11 | }; 12 | -------------------------------------------------------------------------------- /packages/palico-app/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'palico-app', 4 | preset: '../../jest.preset.js', 5 | testEnvironment: 'node', 6 | transform: { 7 | '^.+\\.[tj]s$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], 8 | }, 9 | moduleFileExtensions: ['ts', 'js', 'html'], 10 | coverageDirectory: '../../coverage/packages/palico-app', 11 | }; 12 | -------------------------------------------------------------------------------- /packages/components/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "jsx": "react-jsx", 4 | "allowJs": false, 5 | "esModuleInterop": false, 6 | "allowSyntheticDefaultImports": true, 7 | "strict": true 8 | }, 9 | "files": [], 10 | "include": [], 11 | "references": [ 12 | { 13 | "path": "./tsconfig.lib.json" 14 | } 15 | ], 16 | "extends": "../../tsconfig.base.json" 17 | } 18 | -------------------------------------------------------------------------------- /apps/docs/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "apps/docs", 5 | "projectType": "application", 6 | "targets": { 7 | "dev": { 8 | "executor": "nx:run-commands", 9 | "options": { 10 | "cwd": "apps/docs", 11 | "command": "npx mintlify dev" 12 | } 13 | } 14 | }, 15 | "tags": [] 16 | } 17 | -------------------------------------------------------------------------------- /apps/website/src/utils/cdn.ts: -------------------------------------------------------------------------------- 1 | const video = (name: string) => 2 | `https://d3i78uz5w7h3ks.cloudfront.net/videos/${name}`; 3 | 4 | class VideoCDN { 5 | static ExperimentVideoClip = video('experiment_clip.m4v'); 6 | static PreviewApplicationClip = video('preview_app_clip.mp4'); 7 | static TraceRequestClip = video('trace_clip.mp4'); 8 | } 9 | 10 | export class CDNContent { 11 | static Video = VideoCDN; 12 | } 13 | -------------------------------------------------------------------------------- /packages/cli/src/index.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { Command } from 'commander'; 4 | import { InitHandler } from './init'; 5 | 6 | const root = new Command(); 7 | 8 | root 9 | .command('init') 10 | .description('Initializes a project') 11 | .argument('', 'Name of the project') 12 | .option('-t, --template