Giter VIP home page Giter VIP logo

Comments (5)

naiyunzhang avatar naiyunzhang commented on June 3, 2024

Hi @sargupta , I can't repro the issue. Can I know what extension version you used? If it was not the latest version. Can you try to update to the latest and then have a try? If you still encounter the same issue, can you please share the content of the flow.dag.yaml file and the content of the .promptflow/flow.tools.json file?

By the way, there is a known issue with python 3.12. If you use python 3.12, you may need to downgrade to 3.11.

from promptflow.

sargupta avatar sargupta commented on June 3, 2024

Hi @naiyunzhang

  • pf version: 1.5.0
  • python version: 3.11.5 (previously tried 3.12.1)

Tried using python 3.11 however it didn't solve the issue.
Here is the content of flow.dag.yaml file:

name: Template Chat Flow
environment:
  python_requirements_txt: requirements.txt
inputs:
  chat_history:
    type: list
  question:
    type: string
    is_chat_input: true
outputs:
  answer:
    type: string
    reference: ${parent.output}
    is_chat_output: true
nodes:
- name: parent
  type: llm
  source:
    type: code
    path: parent.jinja2
  inputs:
    deployment_name: gpt-35-turbo
    max_tokens: 256
    temperature: 0.7
    chat_history: ${inputs.chat_history}
    question: ${inputs.question}
  provider: AzureOpenAI
  connection: azure_open_ai_connection
  api: chat
- name: parent_variant_gpt4
  type: llm
  source:
    type: code
    path: parent_variant_gpt4.jinja2
  inputs:
    deployment_name: gpt-4
    max_tokens: 256
    temperature: 0.7
    chat_history: ${inputs.chat_history}
    question: ${inputs.question}
  provider: AzureOpenAI
  connection: azure_open_ai_connection_gpt4
  api: chat

However, there is no such file as .promptflow/flow.tools.json.
List of files you can find in the above screenshot.

from promptflow.

naiyunzhang avatar naiyunzhang commented on June 3, 2024

@sargupta I mean the prompt flow vscode extension version. You can find your extension version here:
image

The .promptflow/flow.tools.json file should be located in evaluation_dev/exp_eval_dev_flow_01/.promptflow/flow.tools.json.

And, have you updated your flow.dag.yaml file from the time this issue occurred? It seems that there is not a variant on the node parent named variant_1 in this flow.dag.yaml file.

from promptflow.

sargupta avatar sargupta commented on June 3, 2024

Hi @naiyunzhang

Prompt flow for VS Code - v1.0.7
flow.dag.yaml

{
  "package": {},
  "code": {
    "parent.jinja2": {
      "type": "llm",
      "inputs": {
        "question": {
          "type": [
            "string"
          ]
        },
        "chat_history": {
          "type": [
            "string"
          ]
        }
      },
      "source": "parent.jinja2"
    }
  }
}


flow.dag.yaml

id: template_chat_flow
name: Template Chat Flow
environment:
  python_requirements_txt: requirements.txt
inputs:
  chat_history:
    type: list
  question:
    type: string
    is_chat_input: true
    default: I need n iphone 15
outputs:
  answer:
    type: string
    reference: ${parent.output}
    is_chat_output: true
nodes:
- name: parent
  use_variants: true
node_variants:
  parent:
    default_variant_id: variant_0
    variants:
      variant_0:
        node:
          type: llm
          source:
            type: code
            path: parent.jinja2
          inputs:
            deployment_name: gpt-35-turbo
            max_tokens: 256
            temperature: 0.7
            chat_history: ${inputs.chat_history}
            question: ${inputs.question}
          provider: AzureOpenAI
          connection: azure_open_ai_connection
          api: chat
      variant_1:
        node:
          type: llm
          source:
            type: code
            path: parent_variant_1.jinja2
          inputs:
            deployment_name: gpt-35-turbo
            max_tokens: 256
            temperature: 0.7
            chat_history: ${inputs.chat_history}
            question: ${inputs.question}
          connection: azure_open_ai_connection_gpt4
          api: chat

from promptflow.

naiyunzhang avatar naiyunzhang commented on June 3, 2024

@sargupta The version v1.0.7 is old. There was a bug in some old versions and it has been fixed in newer versions. I believe an update to the newest version will fix the issue you encountered. Please have a try. Much thanks.

from promptflow.

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.