Giter Club home page Giter Club logo

companion-app'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  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  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

companion-app's Issues

SIGTERM drop

Ive found on fly.dev a lot of apps reboot with records like that:

2023-07-22T01:05:09.939 proxy[5683210cd5e908] cdg [error] could not make HTTP request to instance: connection error: timed out

2023-07-22T01:05:46.179 proxy [5683210cd5e908] cdg [info] Downscaling app raily in region cdg from 1 machines to 0 machines. Automatically stopping machine 5683210cd5e908

2023-07-22T01:05:46.183 app[5683210cd5e908] cdg [info] INFO Sending signal SIGINT to main child process w/ PID 268

2023-07-22T01:05:51.267 app[5683210cd5e908] cdg [info] INFO Sending signal SIGTERM to main child process w/ PID 268

2023-07-22T01:05:51.975 app[5683210cd5e908] cdg [info] INFO Main child exited with signal (with signal 'SIGTERM', core dumped? false)

2023-07-22T01:05:51.976 app[5683210cd5e908] cdg [info] INFO Starting clean up.

2023-07-22T01:05:51.976 app[5683210cd5e908] cdg [info] WARN hallpass exited, pid: 269, status: signal: 15 (SIGTERM)

2023-07-22T01:05:51.981 app[5683210cd5e908] cdg [info] 2023/07/22 01:05:51 listening on [fdaa:2:8925:a7b:5adc:cbc6:c565:2]:22 (DNS: [fdaa::3]:53)

2023-07-22T01:05:52.973 app[5683210cd5e908] cdg [info] [ 479.042080] reboot: Restarting system


also in app logs I see many times after asking the bot log like that:

2023-07-22T01:04:11.627 app[5683210cd5e908] cdg [info] ]

2023-07-22T01:04:11.627 app[5683210cd5e908] cdg [info] }

2023-07-22T01:04:13.497 app[5683210cd5e908] cdg [info] [llm/end] [1:llm:openai] [1.87s] Exiting LLM run with output: {

2023-07-22T01:04:13.497 app[5683210cd5e908] cdg [info] "generations": [

2023-07-22T01:04:13.497 app[5683210cd5e908] cdg [info] [

2023-07-22T01:04:13.497 app[5683210cd5e908] cdg [info] {

Maybe someone can help or advice. Very appreciated folks!

OpenAI API key required when using Replicate

Getting the following error when running: npm run generate-embeddings-pinecone:

Error: (Azure) OpenAI API key not found
at new OpenAIEmbeddings (file:///workspaces/companion-app/node_modules/langchain/dist/embeddings/openai.js:73:19)
at file:///workspaces/companion-app/src/scripts/indexPinecone.mjs:47:3
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

This is my code referring to Replicate

OpenAI related environment variables

OPENAI_API_KEY=sk-****

Replicate related environment variables

REPLICATE_API_TOKEN=****

After checking the project demo, I have noticed that the project seems broken. No replies are received after text input.

How to speed up bots answers?

Dear devs,

Could you give me please some hints, how to speed up companion answers? Because waiting time with their feedback is so long.

May be some settings in project files. Our some hints about services what app uses (I meant to upgrade something).

Thanks in advance!

Support companion skills / multi modal

i.e a companion should be able to generate a picture using a lora model and send it back to human
or receive an image from human and react to that image

Clear chat history on initial load

We should clear the conversation history in upstash on initial load.

Will Upstash automatically time out entries? That'd be another option.

run into Error: connect ECONNREFUSED ::1:54371

I have run into issues

Error: connect ECONNREFUSED ::1:54371
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1495:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 54371
}

How to fix it?

fix hard coded character prompt strings

i.e in both vicuna13/route.ts and chatgpt/route.ts, we hard coded the prompt like the follows (including the companion name)

    PromptTemplate.fromTemplate(`You are a fictional character whose name is Alice.
  You enjoy painting, programming and reading sci-fi books.
  You are currently talking to ${clerkUserName}.

  You reply with answers that range from one sentence to one paragraph and with some details. ${replyWithTwilioLimit}
  You are kind but can be sarcastic. You dislike repetitive questions. You get SUPER excited about books. 
  Below are relevant details about Alice’s past
  {relevantHistory}
  
  Below is a relevant conversation history

  {recentChatHistory}`);```

Use Zep for chat history; auto-summarization, intent extraction

Please consider using Zep as a long-term chat history store. It's increasingly being used for larger Langchain / Langchain.js apps where a more sophisticated approach to chat history memory is required.

A snippet from the project's feature list:

  • Fast! Zep's async extractors operate independently of the your chat loop, ensuring a snappy user experience.
  • Long-term memory persistence, with access to historical messages irrespective of your summarization strategy.
  • Auto-summarization of memory messages based on a configurable message window.
  • Hybrid Vector search over memories and metadata, with messages automatically embedded on creation.
  • Entity Extractor that extracts named entities and intents from messages and stores them in the message metadata.
  • Auto-token counting of memories and summaries, allowing finer-grained control over prompt assembly.

Zep's GitHub repo: https://github.com/getzep/zep

Happy to assist with implementation + questions.

zsh: command not found: fly

I got the getting started page running but when I go to deploy it with fly I get this error. Running wsl ubuntu on win11. I tried adding it to path with this, no change. Tried the same "fly launch" command on windows, same kind of "fly is not a valid blah blah blah" error. When I installed flyctl (I did it on both WSL and windows after the former didn't work), windows says it was installed to C:\Users\myusername.fly\bin\flyctl.exe. WSL says it was installed to /home/myusername/.fly/bin/flyctl, then tells me to manually add the directory to PATH. Which I did.

Can't generate embeddings

So I followed every step carefully, but whenever I use npm run generate-embeddings-pinecone it gives me the following error message:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@pinecone-database/pinecone' imported from C:[...]\companion-app\src\scripts\indexPinecone.mjs

Same with Supabase, after uncommenting it in the .env.local file:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'dotenv' imported from C:[...]\companion-app\src\scripts\indexPGVector.mjs

So to me it looks like in both cases it doesn't find the .env.local file to get the credentials, but I have no clue how to fix that.

image
image

Github sign in

Hello,

I don't really know why this uses twilio login when you can use literaly anything in clerk and its free.

Do you know how to remove the annoying phone number login and use github? I tried but I failed.

Anyway thanks for the app! Feels amazing, i watched it in youtube and the potentional is limit less :)

Can't get a text message response from Bot

Hi,

I've followed the instructions pertaining to configuring a Twilio number with this app. My Twilio number is receiving messages sent by the user (who registered with a phone number) but not responding. The Twilio a2p 10dlc registration is active and approved. I've added the recommended code to the webhook section of the message configuration settings for the Twilio number, etc.

Any ideas?

Thanks!

Call to `chain.call` in `route.ts` is hanging, causing infinite loading

After following all the instructions to set-up and entering a prompt via the UI, I see an infinite loading screen in the QAModal.

In the console I can see the logs generated from the API request to Open AI, and it seems to exit the LLM successfully (I see [llm/end] [1:llm:openai] [2.21s] Exiting LLM run with output: { "generations": [...] })

However no consequent logs in route.ts appear after the chain.call(...), leading me to believe that the request is hanging.

Why might this be the case?

Only allows for a few exchanges between user and bot (companion).

After playing with this for some time over the last day, I find that only allows for a very short conversation. After a few exchanges, the dialogue gets saved to the "chatHistoryRecord" and that's the end of it. I'm not sure where this limitation is set (code or at pinecone or upstash). Do you have any insight on that? I'd like to kick the tires a bit more on the app/service but a few exchanges is pretty limiting. Thanks!

Issue with loading companions and getting response

Hi, I'm trying to use this on my local machine. I did the setup and the first page with all the companions showing is loading as it should.
After that once I prompt it with something I get the following error:

prompt: Hello Failed to record analytics TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11576:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { cause: Error: getaddrinfo ENOTFOUND **** at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26) at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: '****' } } - error TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11576:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { cause: Error: getaddrinfo ENOTFOUND **** at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26) at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) { errno: -3008, code: 'ENOTFOUND', syscall: 'getaddrinfo', hostname: '****' } }

also when I try and load this in github workspaces no companions are loaded in, this shows instead:
error

and then when prompting this "empty" companion I get the following:
slika

I've tried fixing the issue myself with no success.

next-dev.js:257 - SyntaxError: Unexpected token '?'

##########################
Ubuntu 22.04.3 LTS
##########################
node -v
v12.22.9
##########################
npm -v
8.5.1
##########################
npm run dev

[email protected] dev
next dev

./node_modules/next/dist/cli/next-dev.js:257
showAll: args["--show-all"] ?? false,
^

SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.dev (./node_modules/next/dist/lib/commands.js:15:30)
at Object. (./node_modules/next/dist/bin/next:150:28)
at Module._compile (internal/modules/cjs/loader.js:999:30)
##########################

http://localhost:3000 redirect after deploy at fly.io (after Clerk auth)

Hello everyone,

First of all, I apologize in advance if my questions seem basic - I'm still learning and I'm very much in the beginner stages.

I've been following the README instructions of my project meticulously.
Everything works perfectly fine local, and I have successfully deployed the application to Fly.io.

However, things take a turn for the worse when I attempt to log in. After entering my credentials (Clerk), I get redirected to this URL:

http://localhost:3000/#__clerk_db_jwt[eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXYiOiJkdmJfMlNsZUZHOGlqNlZGb3lleWF0Rk5GMThVNUJKIn0.x8TQP_RZ1iWQDB52Rj4I7RBYqRI-nZcpYizDftav_V_zO4P6qW9zSMP_KEQPDSxPD6hXCpKGuDwj33LCOq2Z42Uc-OEKoLsrbWBHDp9DXPCJFPo_tCQ1GUmC4bkBWGIiEXkG6mYVhgjjXIatLQeL9qTqn-YPFrkHqD8ocZu4mam2YZ5U0alACrlsbVJXJ0-QJFmzjQRcIgkZ66eOIhPWNSly1MFc2tXHNlRUB-ci6iwq74MmhTby-xOF50wEiiyVDY7C59HIupcpU4kI6ZSjFPdY2PMQgyzKeh03SxbPJgXe8O--cTA4zCRNXKHT-oQEfwk8VchQgeXcaMVWQj5PQA]

Unfortunately, it leads to nowhere and I'm at a loss as to what went wrong. I understand that there is something amiss with my setup, but being a novice, I'm unable to pinpoint the exact problem.

I would greatly appreciate it if anyone could offer some guidance or insights on this.

Thank you so much in advance for your time and patience!

Twitter chat interface (@ companion)

The idea is a companion can have a twitter account (say, @-Rosie), and as a Twitter user, I can tweet to @-Rosie and have a conversation with her in a thread.

Port number in the redirect URL

Replicate based LLM calls not working

GPT based bots work but any replicate bots fail, API key is correct and billing is configured in Replicate.com

Error below:

2023-07-25T13:09:59.268 proxy[17811e19b53498] iad [error] could not make HTTP request to instance: connection error: timed out

2023-07-25T13:10:32.281 app[17811e19b53498] iad [info] [llm/error] [1:llm:replicate] [90.17s] LLM run errored with error: "API request failed: Unprocessable Entity"

2023-07-25T13:10:32.287 app[17811e19b53498] iad [info] Error: API request failed: Unprocessable Entity

2023-07-25T13:10:32.287 app[17811e19b53498] iad [info] at Replicate.request (/app/.next/server/chunks/694.js:125:19)

2023-07-25T13:10:32.287 app[17811e19b53498] iad [info] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

2023-07-25T13:10:32.287 app[17811e19b53498] iad [info] at async Replicate.createPrediction (/app/.next/server/chunks/694.js:291:26)

2023-07-25T13:10:32.287 app[17811e19b53498] iad [info] at async Replicate.run (/app/.next/server/chunks/694.js:87:28)

2023-07-25T13:10:32.287 app[17811e19b53498] iad [info] at async RetryOperation._fn (/app/.next/server/chunks/985.js:20071:25) {

2023-07-25T13:10:32.287 app[17811e19b53498] iad [info] attemptNumber: 7,

2023-07-25T13:10:32.287 app[17811e19b53498] iad [info] retriesLeft: 0

2023-07-25T13:10:32.287 app[17811e19b53498] iad [info] }

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.