-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
41 changed files
with
1,966 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
[project] | ||
# Whether to enable telemetry (default: true). No personal data is collected. | ||
enable_telemetry = true | ||
|
||
|
||
# List of environment variables to be provided by each user to use the app. | ||
user_env = [] | ||
|
||
# Duration (in seconds) during which the session is saved when the connection is lost | ||
session_timeout = 3600 | ||
|
||
# Enable third parties caching (e.g LangChain cache) | ||
cache = false | ||
|
||
# Authorized origins | ||
allow_origins = ["*"] | ||
|
||
# Follow symlink for asset mount (see https://github.com/Chainlit/chainlit/issues/317) | ||
# follow_symlink = false | ||
|
||
[features] | ||
# Show the prompt playground | ||
prompt_playground = true | ||
|
||
# Process and display HTML in messages. This can be a security risk (see https://stackoverflow.com/questions/19603097/why-is-it-dangerous-to-render-user-generated-html-or-javascript) | ||
unsafe_allow_html = false | ||
|
||
# Process and display mathematical expressions. This can clash with "$" characters in messages. | ||
latex = false | ||
|
||
# Authorize users to upload files with messages | ||
[features.multi_modal] | ||
enabled = true | ||
accept = ["*/*"] | ||
max_files = 20 | ||
max_size_mb = 500 | ||
|
||
# Allows user to use speech to text | ||
[features.speech_to_text] | ||
enabled = false | ||
# See all languages here https://github.com/JamesBrill/react-speech-recognition/blob/HEAD/docs/API.md#language-string | ||
# language = "en-US" | ||
|
||
[UI] | ||
# Name of the app and chatbot. | ||
name = "Chatbot" | ||
|
||
# Show the readme while the thread is empty. | ||
show_readme_as_default = true | ||
|
||
# Description of the app and chatbot. This is used for HTML tags. | ||
# description = "" | ||
|
||
# Large size content are by default collapsed for a cleaner ui | ||
default_collapse_content = true | ||
|
||
# The default value for the expand messages settings. | ||
default_expand_messages = false | ||
|
||
# Hide the chain of thought details from the user in the UI. | ||
hide_cot = false | ||
|
||
# Link to your github repo. This will add a github button in the UI's header. | ||
# github = "" | ||
|
||
# Specify a CSS file that can be used to customize the user interface. | ||
# The CSS file can be served from the public directory or via an external link. | ||
# custom_css = "/public/test.css" | ||
|
||
# Specify a Javascript file that can be used to customize the user interface. | ||
# The Javascript file can be served from the public directory. | ||
# custom_js = "/public/test.js" | ||
|
||
# Specify a custom font url. | ||
# custom_font = "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" | ||
|
||
# Specify a custom build directory for the frontend. | ||
# This can be used to customize the frontend code. | ||
# Be careful: If this is a relative path, it should not start with a slash. | ||
# custom_build = "./public/build" | ||
|
||
# Override default MUI light theme. (Check theme.ts) | ||
[UI.theme] | ||
#font_family = "Inter, sans-serif" | ||
[UI.theme.light] | ||
#background = "#FAFAFA" | ||
#paper = "#FFFFFF" | ||
|
||
[UI.theme.light.primary] | ||
#main = "#F80061" | ||
#dark = "#980039" | ||
#light = "#FFE7EB" | ||
|
||
# Override default MUI dark theme. (Check theme.ts) | ||
[UI.theme.dark] | ||
#background = "#FAFAFA" | ||
#paper = "#FFFFFF" | ||
|
||
[UI.theme.dark.primary] | ||
#main = "#F80061" | ||
#dark = "#980039" | ||
#light = "#FFE7EB" | ||
|
||
|
||
[meta] | ||
generated_by = "1.0.501" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,231 @@ | ||
{ | ||
"components": { | ||
"atoms": { | ||
"buttons": { | ||
"userButton": { | ||
"menu": { | ||
"settings": "Settings", | ||
"settingsKey": "S", | ||
"APIKeys": "API Keys", | ||
"logout": "Logout" | ||
} | ||
} | ||
} | ||
}, | ||
"molecules": { | ||
"newChatButton": { | ||
"newChat": "New Chat" | ||
}, | ||
"tasklist": { | ||
"TaskList": { | ||
"title": "\ud83d\uddd2\ufe0f Task List", | ||
"loading": "Loading...", | ||
"error": "An error occured" | ||
} | ||
}, | ||
"attachments": { | ||
"cancelUpload": "Cancel upload", | ||
"removeAttachment": "Remove attachment" | ||
}, | ||
"newChatDialog": { | ||
"createNewChat": "Create new chat?", | ||
"clearChat": "This will clear the current messages and start a new chat.", | ||
"cancel": "Cancel", | ||
"confirm": "Confirm" | ||
}, | ||
"settingsModal": { | ||
"settings": "Settings", | ||
"expandMessages": "Expand Messages", | ||
"hideChainOfThought": "Hide Chain of Thought", | ||
"darkMode": "Dark Mode" | ||
}, | ||
"detailsButton": { | ||
"using": "Using", | ||
"running": "Running", | ||
"took_one": "Took {{count}} step", | ||
"took_other": "Took {{count}} steps" | ||
}, | ||
"auth": { | ||
"authLogin": { | ||
"title": "Login to access the app.", | ||
"form": { | ||
"email": "Email address", | ||
"password": "Password", | ||
"noAccount": "Don't have an account?", | ||
"alreadyHaveAccount": "Already have an account?", | ||
"signup": "Sign Up", | ||
"signin": "Sign In", | ||
"or": "OR", | ||
"continue": "Continue", | ||
"forgotPassword": "Forgot password?", | ||
"passwordMustContain": "Your password must contain:", | ||
"emailRequired": "email is a required field", | ||
"passwordRequired": "password is a required field" | ||
}, | ||
"error": { | ||
"default": "Unable to sign in.", | ||
"signin": "Try signing in with a different account.", | ||
"oauthsignin": "Try signing in with a different account.", | ||
"redirect_uri_mismatch": "The redirect URI is not matching the oauth app configuration.", | ||
"oauthcallbackerror": "Try signing in with a different account.", | ||
"oauthcreateaccount": "Try signing in with a different account.", | ||
"emailcreateaccount": "Try signing in with a different account.", | ||
"callback": "Try signing in with a different account.", | ||
"oauthaccountnotlinked": "To confirm your identity, sign in with the same account you used originally.", | ||
"emailsignin": "The e-mail could not be sent.", | ||
"emailverify": "Please verify your email, a new email has been sent.", | ||
"credentialssignin": "Sign in failed. Check the details you provided are correct.", | ||
"sessionrequired": "Please sign in to access this page." | ||
} | ||
}, | ||
"authVerifyEmail": { | ||
"almostThere": "You're almost there! We've sent an email to ", | ||
"verifyEmailLink": "Please click on the link in that email to complete your signup.", | ||
"didNotReceive": "Can't find the email?", | ||
"resendEmail": "Resend email", | ||
"goBack": "Go Back", | ||
"emailSent": "Email sent successfully.", | ||
"verifyEmail": "Verify your email address" | ||
}, | ||
"providerButton": { | ||
"continue": "Continue with {{provider}}", | ||
"signup": "Sign up with {{provider}}" | ||
}, | ||
"authResetPassword": { | ||
"newPasswordRequired": "New password is a required field", | ||
"passwordsMustMatch": "Passwords must match", | ||
"confirmPasswordRequired": "Confirm password is a required field", | ||
"newPassword": "New password", | ||
"confirmPassword": "Confirm password", | ||
"resetPassword": "Reset Password" | ||
}, | ||
"authForgotPassword": { | ||
"email": "Email address", | ||
"emailRequired": "email is a required field", | ||
"emailSent": "Please check the email address {{email}} for instructions to reset your password.", | ||
"enterEmail": "Enter your email address and we will send you instructions to reset your password.", | ||
"resendEmail": "Resend email", | ||
"continue": "Continue", | ||
"goBack": "Go Back" | ||
} | ||
} | ||
}, | ||
"organisms": { | ||
"chat": { | ||
"history": { | ||
"index": { | ||
"showHistory": "Show history", | ||
"lastInputs": "Last Inputs", | ||
"noInputs": "Such empty...", | ||
"loading": "Loading..." | ||
} | ||
}, | ||
"inputBox": { | ||
"input": { | ||
"placeholder": "Type your message here..." | ||
}, | ||
"speechButton": { | ||
"start": "Start recording", | ||
"stop": "Stop recording" | ||
}, | ||
"SubmitButton": { | ||
"sendMessage": "Send message", | ||
"stopTask": "Stop Task" | ||
}, | ||
"UploadButton": { | ||
"attachFiles": "Attach files" | ||
}, | ||
"waterMark": { | ||
"text": "Built with" | ||
} | ||
}, | ||
"Messages": { | ||
"index": { | ||
"running": "Running", | ||
"executedSuccessfully": "executed successfully", | ||
"failed": "failed", | ||
"feedbackUpdated": "Feedback updated", | ||
"updating": "Updating" | ||
} | ||
}, | ||
"dropScreen": { | ||
"dropYourFilesHere": "Drop your files here" | ||
}, | ||
"index": { | ||
"failedToUpload": "Failed to upload", | ||
"cancelledUploadOf": "Cancelled upload of", | ||
"couldNotReachServer": "Could not reach the server", | ||
"continuingChat": "Continuing previous chat" | ||
}, | ||
"settings": { | ||
"settingsPanel": "Settings panel", | ||
"reset": "Reset", | ||
"cancel": "Cancel", | ||
"confirm": "Confirm" | ||
} | ||
}, | ||
"threadHistory": { | ||
"sidebar": { | ||
"filters": { | ||
"FeedbackSelect": { | ||
"feedbackAll": "Feedback: All", | ||
"feedbackPositive": "Feedback: Positive", | ||
"feedbackNegative": "Feedback: Negative" | ||
}, | ||
"SearchBar": { | ||
"search": "Search" | ||
} | ||
}, | ||
"DeleteThreadButton": { | ||
"confirmMessage": "This will delete the thread as well as it's messages and elements.", | ||
"cancel": "Cancel", | ||
"confirm": "Confirm", | ||
"deletingChat": "Deleting chat", | ||
"chatDeleted": "Chat deleted" | ||
}, | ||
"index": { | ||
"pastChats": "Past Chats" | ||
}, | ||
"ThreadList": { | ||
"empty": "Empty...", | ||
"today": "Today", | ||
"yesterday": "Yesterday", | ||
"previous7days": "Previous 7 days", | ||
"previous30days": "Previous 30 days" | ||
}, | ||
"TriggerButton": { | ||
"closeSidebar": "Close sidebar", | ||
"openSidebar": "Open sidebar" | ||
} | ||
}, | ||
"Thread": { | ||
"backToChat": "Go back to chat", | ||
"chatCreatedOn": "This chat was created on" | ||
} | ||
}, | ||
"header": { | ||
"chat": "Chat", | ||
"readme": "Readme" | ||
} | ||
} | ||
}, | ||
"hooks": { | ||
"useLLMProviders": { | ||
"failedToFetchProviders": "Failed to fetch providers:" | ||
} | ||
}, | ||
"pages": { | ||
"Design": {}, | ||
"Env": { | ||
"savedSuccessfully": "Saved successfully", | ||
"requiredApiKeys": "Required API Keys", | ||
"requiredApiKeysInfo": "To use this app, the following API keys are required. The keys are stored on your device's local storage." | ||
}, | ||
"Page": { | ||
"notPartOfProject": "You are not part of this project." | ||
}, | ||
"ResumeButton": { | ||
"resumeChat": "Resume Chat" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.env | ||
.venv/ | ||
*.secret.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.venv/ | ||
.env | ||
*.secret.yaml | ||
__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Teach your LLM to dynamically call your services with EventTypes | ||
|
||
This repo is a proof of concept for how to use EventTypes to have an LLM dynamically learn to call the services which are subscribed to those eventtypes. | ||
In order for this to work, your EventTypes MUST use the `schemaData` field with a specific format of JSON string data. To see some examples, check the | ||
eventtypes defined in `chat-app/config/eventtypes`. This is necessary so that the LLM can learn what data and what types of data it should use when calling | ||
the service. | ||
|
||
## Trying it out | ||
|
||
To try this out, start by getting an OPENAI API key and a TAVILY API key (Tavily is a search engine optimized for AI, and is used as an example of a "hard coded" tool the LLM can call). | ||
Putting these keys into the secret in `chat-app/config`, you will be able to deploy the app from there into a cluster that alread has Knative Eventing and Knative Serving installed, | ||
and it will be able to call out to Tavily and ask you (the human) when it gets stuck. These are the two "hard coded" tools. To go beyond the hard coded tools and use dynamically created ones, | ||
you will need to also deploy the `request-proxy` deployment and service in the `request-proxy` folder with `ko apply -f request-proxy/config`. This proxy is needed because the LLM expects a simple | ||
response to its http request with the answer, and since we use a broker to talk to all our tools we need to actually subscribe to the events to figure out which is a response. Responses are found | ||
by comparing the CE extension attribute `responseid` with the ID of the original event sent by the LLM. | ||
|
||
Now, all you need to test it out are some functions and eventtypes! There are two functions provided in this repo which you can deploy with `func deploy`, as well as corresponding eventtypes in the | ||
`chat-app/config/eventtypes` folder. Important: the LLM can only call your function if you have an eventtype for it! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Welcome to Chainlit! 🚀🤖 | ||
|
||
Hi there, Developer! 👋 We're excited to have you on board. Chainlit is a powerful tool designed to help you prototype, debug and share applications built on top of LLMs. | ||
|
||
## Useful Links 🔗 | ||
|
||
- **Documentation:** Get started with our comprehensive [Chainlit Documentation](https://docs.chainlit.io) 📚 | ||
- **Discord Community:** Join our friendly [Chainlit Discord](https://discord.gg/k73SQ3FyUh) to ask questions, share your projects, and connect with other developers! 💬 | ||
|
||
We can't wait to see what you create with Chainlit! Happy coding! 💻😊 | ||
|
||
## Welcome screen | ||
|
||
To modify the welcome screen, edit the `chainlit.md` file at the root of your project. If you do not want a welcome screen, just leave this file empty. |
Oops, something went wrong.