nitishragu12 / Capstone-Project

0 stars 1 forks source link

API - Mutate data with LLM #39

Closed somni1oquist closed 2 months ago

somni1oquist commented 2 months ago

Add service function to enable the model to mutate result data with instructions.

somni1oquist commented 2 months ago

API - Mutate data with LLM

somni1oquist commented 2 months ago

Ref: https://firebase.google.com/docs/vertex-ai/chat?platform=web#chat-non-streaming

Implemented chat session (multi-turn) functionality using structure:

const chat = model.startChat({
    history: [
      {
        role: "user",
        parts: [{ text: "Hello, I have 2 dogs in my house." }],
      },
      {
        role: "model",
        parts: [{ text: "Great to meet you. What would you like to know?" }],
      },
    ],
    generationConfig: {
      maxOutputTokens: 100,
    },
  });