Git Product home page Git Product logo

chatgpt-ui's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatgpt-ui's Issues

Styling Issues

Absolutely love the idea of this application so kudos to you. I'm just having a play round with the code and from initial clone I receive the following error:

`[ERROR] Could not resolve "highlight.js"

    js/app.js:24:17:
      24 │ import hljs from "highlight.js";
         ╵                  ~~~~~~~~~~~~~~

  You can mark the path "highlight.js" as external to exclude it from the bundle, which will remove this error.

1 error
[watch] build finished, watching for changes...
Error: Failed to find '../../node_modules/highlight.js/styles/googlecode.css'
  in [
    /Users/g/code/elixir/chatgpt-ui/assets/css
  ]
    at /snapshot/tailwindcss/node_modules/postcss-import/lib/resolve-id.js:35:13
    at async LazyResult.runAsync (/snapshot/tailwindcss/node_modules/postcss/lib/lazy-result.js:396:11)
    at async Object.watch (/snapshot/tailwindcss/lib/cli/build/plugin.js:359:13)
    at async build (/snapshot/tailwindcss/lib/cli/build/index.js:40:9)
`

Am I missing something obvious here? Apologies if so - still learning.

Allow chaining and persistence

Thanks for the awesome project!

Any thoughts on allow chaining similar to langchain as well as persistence?

There's a demo here that includes what I think is a pretty good approach to persistence: https://github.com/brainlid/langchain_demo

Maybe Scenarios here could pull it's settings from a scenarios database table and "conversations" saved under a "History" section?

Also related: #6

docker run error

Thank you for the nice work!
I faced a problem in running via docker.

I followed the setup procedure

# Clone the project
git clone https://github.com/dvcrn/chatgpt-ui
cd chatgpt-ui

# Install Elixir
mix deps.get

# Install node dependencies
yarn install      # or npm install
mix assets.setup
mix assets.build

# Start the dev server
export OPENAI_API_KEY=<api-key>
export OPENAI_ORGANIZATION_KEY=<org-key>
mix phx.server

and successfully running.

but when I follow the docker procedure,

docker build . -t chatgpt
docker run -e SECRET_KEY_BASE=<keybase here> -e HOST="localhost" -p 4000:4000 chatgpt

it's stuck at

05:30:11.447 [info] Running ChatgptWeb.Endpoint with cowboy 2.9.0 at :::4000 (http)
05:30:11.447 [info] Access ChatgptWeb.Endpoint at https://localhost
05:30:11.447 [info] downloading tokenizer model: bert-base-multilingual-uncased

Is there any missing step?

Question:

%ExOpenAI.Components.ChatCompletionRequestMessage{

I have a question regarding

  defp new_msg(m) do
    %ExOpenAI.Components.ChatCompletionRequestMessage{
      content: m,
      role: :user,
      name: "user"
    }
  end

  @spec role(String.t()) :: atom()
  defp role(r) when is_binary(r), do: String.to_atom(r)
  @spec role(atom()) :: atom()
  defp role(r) when is_atom(r), do: r

  @spec to_domain(ExOpenAI.Components.ChatCompletionResponseMessage.t()) :: Message.t()
  defp to_domain(msg) do
    %Message{
      content: msg.content,
      sender: role(msg.role),
      id: 0
    }
  end

  @spec from_domain(Message.t()) :: ExOpenAI.Components.ChatCompletionRequestMessage.t()
  defp from_domain(msg) do
    %ExOpenAI.Components.ChatCompletionRequestMessage{
      content: msg.content,
      role: role(msg.sender)
    }
  end

It should now be using either ChatCompletionRequestUserMessage or ChatCompletionRequestAssistantMessage instead of ChatCompletionRequestMessage right?

Gigalixir Error

Hi, I'm trying to deploy it to a free Gigalixir account and I get a Segmentation fault error. Is it possible to deploy on Gigalixir?

[debug] NIF cached at /app/.cache/rustler_precompiled/precompiled_nifs/libex_tokenizers-v0.3.0-nif-2.15-x86_64-unknown-linux-gnu.so.tar.gz and extracted to /tmp/build/_build/prod/lib/tokenizers/priv/native/libex_tokenizers-v0.3.0-nif-2.15-x86_64-unknown-linux-gnu.so
remote: /tmp/buildpackKbgln/lib/app_funcs.sh: line 89: 651 Segmentation fault (core dumped) mix compile --force
remote: 2024/03/05 09:05:52 exit status 1
remote: Deploy aborted

License?

I wasn't able to find a license for this repo. Is there a license already? If not I would suggest MIT. I'm happy to add one and send a PR

Thoughts on adding database persistence?

Something I've discovered through use that is a great feature is persistence of chats (i.e. chat history). Have you considered adding storage of chat history in postgres or something beyond the browser?

Just thinking through it a bit, it may require some UI changes since it wouldn't take long until the history was cluttered so might not be a trivial addition, but figured it was worth bringing up.

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.