Coder Social home page Coder Social logo

Comments (5)

ashpreetbedi avatar ashpreetbedi commented on August 16, 2024 2

@justinqcai this happens when you already have a PgVector volume meaning the init db couldn't create the ai role. No worries the easiest path for us is to use a different name for the PgVector database. Update your cookbook/knowledge/resources.py file to:

from phi.docker.app.postgres import PgVectorDb
from phi.docker.resources import DockerResources

# -*- PgVector running on port 5532:5432
vector_db = PgVectorDb(
    name="knowledge-db",
    pg_user="ai",
    pg_password="ai",
    pg_database="ai",
    host_port=5532,
)

# -*- DockerResources
dev_docker_resources = DockerResources(apps=[vector_db])

Then run phi start cookbook/knowledge/resources.py -y and it should work

I've update the resources file in the cookbook as well so you can just pull from main to get the new code.

Let me know if you still face an issue :)

from phidata.

justinqcai avatar justinqcai commented on August 16, 2024

Awesome, thanks! It looks like the resources file in /cookbook/rag and the whole folder in general looks to be a duplicate, just wanted to bring that up as well before closing this thread out. Probably worth updating that resources file as well or simply removing the duplicate folder

from phidata.

ashpreetbedi avatar ashpreetbedi commented on August 16, 2024

@justinqcai that is correct, the duplicates are intentional as users usually look for RAG/PDF cookbooks which are the duplicates but make it easier for users to search. im open to suggestions here :)

from phidata.

justinqcai avatar justinqcai commented on August 16, 2024

@ashpreetbedi That makes sense, in that case my only suggestion would be to update that file with the same changes you made here so users can run the RAG cookbook properly! Thanks Ash

from phidata.

ashpreetbedi avatar ashpreetbedi commented on August 16, 2024

Very good idea @justinqcai, will do that

from phidata.

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.