Giter Club home page Giter Club logo

Comments (3)

4skinSkywalker avatar 4skinSkywalker commented on July 17, 2024

Mmh... I've tried chaining messages as in the examples and it doesn't work: If I pass the current res.id to the next sendMessage as parentMessageId it's basically just spawning a new chat with the prompt... Why is it doing that?

The following is my entry in the DB:
image

This is where I send the former completion id as parentMessageId to a new prompt:

image

It answers that he can speak in French, but I'd have expected the output text of the "Golden Circle" wrote in Franch.

from agentic.

4skinSkywalker avatar 4skinSkywalker commented on July 17, 2024

Follows a full convo test (which I don't think is working as expected).
As you can see I'm feeding Output.id into Input.parentMessageId.
Why is it choosing whatever parentMessageId it wants from one message to the next?

Listening on port 3000



Input {
  chatId: '654f8e50d927de661d043342',
  parentMessageId: undefined,
  prompt: 'Write a poem about cats.',
  systemMessage: undefined,
  userId: '654f8d0bd927de661d04333d'
}

Output {
  role: 'assistant',
  id: 'chatcmpl-8K5DKKmDthPkKuiChn5nxKSjjNNqG',
  conversationId: '654f8e50d927de661d043342',
  parentMessageId: 'caf714e9-c41e-46c4-9e06-fea666e51196',
  text: 'In moonlit nights, they prowl with grace,\n' +   
    'Silent hunters, an elegant embrace.\n' +
    'Their eyes aglow, reflections gleam,\n' +
    'Mysterious creatures, of feline dream.\n' +
    '\n' +
    'With velvet paws and nimble feet,\n' +
    'They tread their path, both sly and fleet.\n' +      
    'Through alleys dark and rooftops high,\n' +
    'Curiosity fuels their inquisitive sky.\n' +
    '\n' +
    'Whiskers twitch, senses sharp,\n' +
    'Detecting whispers in the dark.\n' +
    "A predator's prowess, honed to perfection,\n" +      
    'Cats reign supreme, a regal connection.\n' +
    '\n' +
    'From playful pounces to gentle purrs,\n' +
    'They charm our hearts without any words.\n' +        
    'Independent souls, yet seeking affection,\n' +       
    'Their presence brings us respite and protection.\n' +
    '\n' +
    'With soft fur and a soothing hum,\n' +
    'They bring warmth when days are glum.\n' +
    'Cats, enchanting beings, so free and wild,\n' +      
    'Forever bewitching, like a whimsical child.\n' +     
    '\n' +
    'So let us honor these captivating friends,\n' +      
    'Whose presence on Earth seems to transcend.\n' +     
    'For in their essence, we find solace and peace,\n' + 
    'Cats, beloved companions, never cease.',
  detail: {
    id: 'chatcmpl-8K5DKKmDthPkKuiChn5nxKSjjNNqG',
    object: 'chat.completion',
    created: 1699797294,
    model: 'gpt-3.5-turbo-0613',
    choices: [ [Object] ],
    usage: { prompt_tokens: 91, completion_tokens: 221, total_tokens: 312 }
  }
}



Input {
  chatId: '654f8e50d927de661d043342',
  parentMessageId: 'chatcmpl-8K5DKKmDthPkKuiChn5nxKSjjNNqG',
  prompt: 'Can you make it cuter and shorter?',
  systemMessage: undefined,
  userId: '654f8d0bd927de661d04333d'
}
Output {
  role: 'assistant',
  id: 'chatcmpl-8K5E3OePuzgKpTOOWbatSUBEnpAZO',
  conversationId: '654f8e50d927de661d043342',
  parentMessageId: 'cc964cb4-d920-44d0-b428-e0c5e473f28d',
  text: 'Sure!',
  detail: {
    id: 'chatcmpl-8K5E3OePuzgKpTOOWbatSUBEnpAZO',
    object: 'chat.completion',
    created: 1699797339,
    model: 'gpt-3.5-turbo-0613',
    choices: [ [Object] ],
    usage: { prompt_tokens: 94, completion_tokens: 2, total_tokens: 96 }
  }
}



Input {
  chatId: '654f8e50d927de661d043342',
  parentMessageId: 'chatcmpl-8K5E3OePuzgKpTOOWbatSUBEnpAZO',
  prompt: 'Now write it in French.',
  systemMessage: undefined,
  userId: '654f8d0bd927de661d04333d'
}
Output {
  role: 'assistant',
  id: 'chatcmpl-8K5EdCVwkNhkYTLPNVioBJtooHtmq',
  conversationId: '654f8e50d927de661d043342',
  parentMessageId: '3cdd3909-efe5-40b4-84d4-539d80bcfdbe',
  text: 'Écrivez-la en français maintenant.',
  detail: {
    id: 'chatcmpl-8K5EdCVwkNhkYTLPNVioBJtooHtmq',
    object: 'chat.completion',
    created: 1699797375,
    model: 'gpt-3.5-turbo-0613',
    choices: [ [Object] ],
    usage: { prompt_tokens: 91, completion_tokens: 9, total_tokens: 100 }
  }
}

from agentic.

transitive-bullshit avatar transitive-bullshit commented on July 17, 2024

This project is undergoing a major revamp; closing out old issues as part of the prep process.

The chatgpt package is pretty outdated at this point. I recommend that you use the openai package or the openai-fetch package instead.

from agentic.

Related Issues (20)

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.