Code Monkey home page Code Monkey logo

Comments (14)

typpo avatar typpo commented on June 13, 2024

Hi @tonimatas1, what's the error when you click the share button in the UI? Are you setting the PROMPTFOO_REMOTE_API_BASE_URL and PROMPTFOO_REMOTE_APP_BASE_URL environment variables locally before running promptfoo view or promptfoo share?

from promptfoo.

tonimatas1 avatar tonimatas1 commented on June 13, 2024
Screenshot 2024-03-28 at 14 49 25 Completely opaque, as you can see.

from promptfoo.

tonimatas1 avatar tonimatas1 commented on June 13, 2024

I think I have issues understanding the path and the folders in Railway deployment and, as the system does everything by itself and I have no access to folders info, I feel completely lost.
The evaluations run fine, and the evals are persistent, but prompts and datasets does not appear in their sections and share yields the error I pasted before.

from promptfoo.

typpo avatar typpo commented on June 13, 2024

Anything in the browser console/network tab?

Are you running evals through the web UI, or are you sending them to the server with promptfoo share?

from promptfoo.

tonimatas1 avatar tonimatas1 commented on June 13, 2024

I'm running the evals through the web UI.
I'm not sure what I've changed but now there is not the same error when sharing but the 404 Eval not found.
Again everything is running fine but prompts and datasets are not showing up and evals are persisting when I do a new deployment in Railway so the files should be there.

from promptfoo.

tonimatas1 avatar tonimatas1 commented on June 13, 2024

This is the mount path where I mounted the volume:

Mount Path
Directory that this volume is mounted to in promptfoo
/root/.promptfoo

And these are the environtment variables except OPENAI:
NEXT_PUBLIC_PROMPTFOO_REMOTE_API_BASE_URL=https://promptfoo.up.railway.app
PROMPTFOO_REMOTE_API_BASE_URL=${{RAILWAY_PUBLIC_DOMAIN}}
PROMPTFOO_REMOTE_APP_BASE_URL=${{RAILWAY_PUBLIC_DOMAIN}}
PROMPTFOO_SHARE_STORE_PATH=/root/.promptfoo/share-store
PROMPTFOO_SHARE_STORE_TYPE=filesystem

${{RAILWAY_PUBLIC_DOMAIN}} is promptfoo.up.railway.app

from promptfoo.

tonimatas1 avatar tonimatas1 commented on June 13, 2024

Yes, tons of errors in the browser console:

setup/:1 The resource https://promptfoo.up.railway.app/_next/static/css/87fb00eed311e9cd.css was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
api/prompts/:1

   Failed to load resource: the server responded with a status of 404 ()

prompts/:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
api/datasets/:1

   Failed to load resource: the server responded with a status of 404 ()

datasets/:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
api/prompts/:1

   Failed to load resource: the server responded with a status of 404 ()

prompts/:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
api/datasets/:1

   Failed to load resource: the server responded with a status of 404 ()

datasets/:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
api/prompts/:1

   Failed to load resource: the server responded with a status of 404 ()

prompts/:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
api/prompts/:1

   Failed to load resource: the server responded with a status of 404 ()

prompts/:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
api/datasets/:1

   Failed to load resource: the server responded with a status of 404 ()

datasets/:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON

from promptfoo.

tonimatas1 avatar tonimatas1 commented on June 13, 2024
Screenshot 2024-03-28 at 15 25 33

from promptfoo.

typpo avatar typpo commented on June 13, 2024

from promptfoo.

tonimatas1 avatar tonimatas1 commented on June 13, 2024

As an evirontment variable, you mean?
Yes, it's:
NEXT_PUBLIC_PROMPTFOO_REMOTE_API_BASE_URL=https://promptfoo.up.railway.app

from promptfoo.

typpo avatar typpo commented on June 13, 2024

Ok, sorry about that, I understand the issues you're reporting now:

  • The share modal always displays the app.promptfoo.dev prefix, even though it's shared to the local instance (promptfoo.up.railway.app)
  • The self-hosted instance currently doesn't support the prompts and datasets API endpoint

Both are fairly easy fixes that can be prioritized. I'll keep this issue open and let you know once the fixes are in!

from promptfoo.

tonimatas1 avatar tonimatas1 commented on June 13, 2024

That sounds great!
So I understand there is no wrong configuration on my side, so I can go on working with this version till these issues will be fixed. I can work with it as is.
If it's ok for you, I'm going to change the deployment URL to avoid leaving it public here.

from promptfoo.

typpo avatar typpo commented on June 13, 2024

Of course. Sounds good 👍

from promptfoo.

typpo avatar typpo commented on June 13, 2024

These fixes are released in 0.50.1

Note that the build arg variable has changed to NEXT_PUBLIC_PROMPTFOO_BASE_URL, because it applies to both the app and api :)

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.