Coder Social home page Coder Social logo

langchain-ui's People

Contributors

homanp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

langchain-ui's Issues

Datasource PDF

Is your proposal related to a problem?

Add PDF type of documents as datasource

Create `UserProfile` schema

Summary

When a user signups for the first time a UserProfile entry should be created in the database.

Expected behaviour

  • Create UserProfile Prisma schema.
  • Create a UserProfile object for newly created accounts.

have any method to config proxy by default fetch?

have any method to config proxy by default fetch?

in node_modules\langchain\dist\util\axios-fetch-adapter.js
langchain link openapi default by fetch not axios.post
stageOne = await fetch(request)

I try https-proxy-agent but not work.
So if you have any method to change proxy in fetch adapter?

By the way,clash for windows global mode did not change nodejs network proxy.

Redirect after auth

Steps to reproduce

  1. Authenticate user
  2. No the redirect URL is not triggered

Expected behaviour

A user should be redirected to app after successful authentication

Move Agents and Chain API to use LangChain Python package

Is your proposal related to a problem?

Move Agents and Chain API to use Python.

Describe the solution you'd like

The LangchainJS API is missing some core features such as QA over longer documents using Agents. In order to utilize this we need to migrate the invocation API to LangchainPy.

Long messages are hidden below the fold in the chat UI.

Describe the bug
When the LLM is writing long messages the window should scroll to the bottom of that message so the user doesn't have to scroll to see new tokens coming in.

To Reproduce
Steps to reproduce the behavior:

  1. Minimize the browser window
  2. Ask the chatbot to write a longer text

Expected behaviour
The chat window should adaptively scroll to show the last token streamed.

Support creation of Agents.

Is your proposal related to a problem?

Add possibility for the user to create Agents and connect them to chatbots and other tools.

Describe the solution you'd like

A user should be able to create Agents in a simple ans straightforward way.

Describe alternatives you've considered

(Write your answer here.)

Additional context

The UI focus on connecting different Tools and chains to the agent.

Add support for `Vectorstores`

Is your proposal related to a problem?

Add support for Vectorestores

Describe the solution you'd like

Add support for vectorestores to support future document ingestion.

Figma design for `Prompt templates` UI

Summary

A user should be able to create and save LangChain compatible Prompt templates as per the specification here: https://python.langchain.com/en/latest/modules/prompts/prompt_templates.html

Expected behaviour

  • A user should be able to create, update or destroy Prompt templates for further user down-stream in Agents of Chats.
  • The prompt template should support inserting variables, as seen in example below:
from langchain import PromptTemplate


template = """
I want you to act as a naming consultant for new companies.

Here are some examples of good company names:

- search engine, Google
- social media, Facebook
- video sharing, YouTube

The name should be short, catchy and easy to remember.

What is a good name for a company that makes {product}?
"""

prompt = PromptTemplate(
    input_variables=["product"],
    template=template,
)

Design inspiration

The app boilerplate looks as follows. Perhaps a list/detail view would be appropriate for this.

Screenshot 2023-03-27 at 09 52 57

LangChain UI app icon

Summary

LangChain UI needs an app icon.

Deliverables

  • favicon.ico
  • icon in svg or png format
  • light/dark mode

App skeleton

Summary

Add a sidebar and main layout under the app folder.

Authentication

I encountered an error with the NextAuth.js adapter while attempting to retrieve user information from the database during the OAuth callback handler. The error message indicates that there is an issue with the findUnique method, which is being called on an undefined object. Here's the error message:

[next-auth][error][adapter_error_getUserByAccount] https://next-auth.js.org/errors#adapter_error_getuserbyaccount Cannot read properties of undefined (reading 'findUnique') {
message: "Cannot read properties of undefined (reading 'findUnique')",
stack: "TypeError: Cannot read properties of undefined (reading 'findUnique')\n" +
' at getUserByAccount (/home/cueva/langchain-ui/node_modules/@next-auth/prisma-adapter/dist/index.js:11:45)\n' +
' ...
This issue seems to be caused by an incorrect configuration of the adapter or an issue with the database itself.

Steps to reproduce:

Navigate to the login page
Click on the login button and select the OAuth provider
Enter the credentials and submit the form
Encounter the error message
Expected behavior:
The user should be able to successfully log in using the OAuth provider.

Actual behavior:
Encounter an error with the NextAuth.js adapter when attempting to retrieve user information from the database during the OAuth callback handler.

Environment:

NextAuth.js version: [insert version number here]
Operating system: [insert operating system name and version here]
Database: [insert database name and version here]
Other relevant information: [insert any other relevant information here]
Thank you for your help in resolving this issue.

Memory tweaks

Is your proposal related to a problem?

Memory should only take into account the last 5 messages for performance reasons.

Describe the solution you'd like

Only fetch the five last messages and feed into BufferMemory

App pages

##Summary
Create pages for the following LangChain objects:

  • Documents
  • Prompt templates
  • Indexes
  • Chatbots

Ability to set prompt template to chatbot

Is your proposal related to a problem?

A chatbot should be able to ingest a Prompt template.

Describe the solution you'd like

Whenever a user chooses a Prompt template from the chatbot sidebar this prompt template should be passed to the chatbot.

Support code in markdown returned by chatbot.

Is your proposal related to a problem?

We need a better way of showing markdown code, similar to the one used by chatGPT/OpenAI.

Describe the solution you'd like

Code returned by the chatbot should wrapped in a separate UI similar to chatGPT.

Screenshot 2023-04-09 at 20 01 34

Documentation?

So I have a bunch of chat transcripts as text files. Looks like I need to convert these chat transcripts into a CSV. What should the CSV look like?

error load app

Good afternoon. I am trying to run the application in my Gitbub codespace and I am getting the following error.
I have followed the instructions in your repository.
I have doubts about the .ENV file.
I have only completed the following....

NEXT_PUBLIC_GITHUB_ID=
NEXT_PUBLIC_GITHUB_SECRET=
OPENAI_API_KEY=

Are the rest of the configs mandatory?
Also, I had a question about the setup in Github with the Authorization callback URL.(not sure url to put in)

The error in the application in the browser is as follows:
Server Error
Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
In case this error is unexpected for you, please report it in https://github.com/prisma/prisma/issues

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Source
new PrismaClient
file:///C:/Users/jmery/Downloads/botmanager/langchain-ui/node_modules/.prisma/client/index.js (3:11)

And in the console it shows me the following:
[next-auth][error][SIGNIN_OAUTH_ERROR]
https://next-auth.js.org/errors#signin_oauth_error client_id is required {
error: {
message: 'client_id is required',
stack: 'TypeError: client_id is required\n' +
' at new BaseClient (/workspaces/langchain-ui/node_modules/openid-client/lib/client.js:178:13)\n' +
' at new Client (/workspaces/langchain-ui/node_modules/openid-client/lib/client.js:1789:7)\n' +
' at openidClient (/workspaces/langchain-ui/node_modules/next-auth/core/lib/oauth/client.js:28:18)\n' +
' at getAuthorizationUrl (/workspaces/langchain-ui/node_modules/next-auth/core/lib/oauth/authorization-url.js:70:49)\n' +
' at Object.signin (/workspaces/langchain-ui/node_modules/next-auth/core/routes/signin.js:38:60)\n' +
' at AuthHandler (/workspaces/langchain-ui/node_modules/next-auth/core/index.js:253:39)\n' +
' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at async NextAuthHandler (/workspaces/langchain-ui/node_modules/next-auth/next/index.js:24:19)\n' +
' at async /workspaces/langchain-ui/node_modules/next-auth/next/index.js:60:32',
name: 'TypeError'
},
providerId: 'github',
message: 'client_id is required'

Thanks for your help and amazing job.
Sorry my poor english

Figma design for chat UI

Problem statement

Currently it's difficult for non-technical users to setup a chatbot for different purpose via langchain, because it requires them to setup environment, understand the purpose of different components (e.g. prompt template, chain, etc.). HMW lower the barrier for them?

Describe the solution you'd like

  • We enable non-technical users to customise a chatbot with their own model, docs, prompt templates, with UI that similar to chatGPT (which is something they are familiar with)
  • Change the UX to make all setup flow of prompt templates, docs, etc. as part of the configuration of the chatbot, so that users have better understanding of the purpose of each component;
  • Demo: https://www.loom.com/share/0c910f36ada44bbb822c2c495b08b630

image

Describe alternatives you've considered

  • Tried another version that is more similar to traditional chatbot building UI with different components
  • Didn't continue with this version as it is built for the scenario where users want to embed the UI on their own website, while i think there are quite a lot of value for users to build a custom bot without embeding

image

Add possiblity to theme `chatbot` interface

Describe the solution you'd like

A user should be able to theme their chatbot interface (similar to other chat apps like Telegram)

Theme support should be programmable by the user so anyone can create a theme for a chatbot.

`Chatbots` page

Summary

The user needs a view from where they can create chatbots.

Expected behaviour

List and detail view for creating, editing and querying chatbots.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.