Code Monkey home page Code Monkey logo

Comments (5)

typpo avatar typpo commented on June 12, 2024 2

Here's my workflow to use the CLI after a fresh git clone:

NEXT_PUBLIC_SUPABASE_URL=http:// NEXT_PUBLIC_SUPABASE_ANON_KEY=abc123 npm install

./dist/src/main.js view
  • The Supabase account is not necessary for development, I just put dummy envars. It's only used for hosting the promptfoo share results at app.promptfoo.dev.
  • I also use npm link so I can just run promptfoo instead of manually specifying ./dist/src/main.js.

If I'm developing the web view, then:

cd src/web/nextui
npm run dev

which runs the next.js app on localhost:3000 with hot reload and other debugging amenities.

from promptfoo.

Wehzie avatar Wehzie commented on June 12, 2024 1

Hello @e3oroush, I've been doing the following.

git clone https://github.com/promptfoo/promptfoo.git
cd path/to/promptfoo-source
npm i

cd path/to/experiment-with-promptfoo # contains your promptfooconfig.yaml
npx path/to/promptfoo-source eval

Consider using npx with --no-cache to avoid caching a build in ~/.npm/_npx/...

I run into the same problem of npx path/to/promptfoo-source view not working. However, using npx promptfoo@latest view in combination has worked, the promptfoo cache seems shared.

from promptfoo.

e3oroush avatar e3oroush commented on June 12, 2024 1

Hello @e3oroush, I've been doing the following.

git clone https://github.com/promptfoo/promptfoo.git
cd path/to/promptfoo-source
npm i

cd path/to/experiment-with-promptfoo # contains your promptfooconfig.yaml
npx path/to/promptfoo-source eval

Consider using npx with --no-cache to avoid caching a build in ~/.npm/_npx/...

I run into the same problem of npx path/to/promptfoo-source view not working. However, using npx promptfoo@latest view in combination has worked, the promptfoo cache seems shared.

I used this approach. Worked perfectly. Thanks.

from promptfoo.

shaayaansayed avatar shaayaansayed commented on June 12, 2024

@typpo how could one run "./dist/src/main.js view" during development with hot reloading?

from promptfoo.

typpo avatar typpo commented on June 12, 2024

@shaayaansayed As of 83065a9, to develop the web UI locally, run:

npm run local:web

This hosts a web frontend at http://localhost:3000 that talks to the promptfoo view web server. The :3000 endpoint has hot reloading and other benefits of Next.js's developer environment. You'll need to run promptfoo view or ./dist/src/main.js view at the same time in order to provide the server side.

from promptfoo.

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.