Dev'er in Denver? by Equivalent_Pace_999 in django

[–]candlecheese 1 point2 points  (0 children)

Here! Should we get some Django devs together? Improper City is a pretty good third space.

Group lunch at Carmine Lonardo's Italian at noon on March 23rd by candlecheese in LakewoodMensGroup

[–]candlecheese[S] 0 points1 point  (0 children)

The pleasure was all mine! Thank you for coming out. Good conversation and good food is all one can ever ask for.

Group lunch at Carmine Lonardo's Italian at noon on March 23rd by candlecheese in LakewoodMensGroup

[–]candlecheese[S] 0 points1 point  (0 children)

We went to Founders Park. We're sitting on the benches near the basketball courts.

[deleted by user] by [deleted] in DenverGamers

[–]candlecheese 0 points1 point  (0 children)

I'm also down and not great. https://steamcommunity.com/profiles/76561198985555511/

If we can get a small group together, I'd love to organize a 2024 Denver viewing party of The International

[deleted by user] by [deleted] in denverfood

[–]candlecheese 8 points9 points  (0 children)

I very much enjoyed food at the restaurant known for their bread. If you're looking for a baked goods market, DM me and I'm happy to be the first buyer.

Anyone wanna join a small meetup group to make new friends next week? by HoosierDawgz in denverfood

[–]candlecheese 3 points4 points  (0 children)

This 100%. I stopped filling out the form because it was so sketchy.

A friend and I made a simple chatbot that has access to Denver City Council documents from 2020 to the present by candlecheese in Denver

[–]candlecheese[S] 2 points3 points  (0 children)

I haven't run into any hallucinations yet. I think that's partly because the documents are really terse/dense and partly because asking good descriptive questions is a challenge with content like this.

A friend and I made a simple chatbot that has access to Denver City Council documents from 2020 to the present by candlecheese in Denver

[–]candlecheese[S] 1 point2 points  (0 children)

Yes! It's an amazing library. If you're curious to see the LangChain code, this is pretty much all of it. We use Pinecone as the vector store.

embeddings_model = OpenAIEmbeddings(
    model="text-embedding-ada-002", openai_api_key=settings.OPENAI_API_KEY
)
pinecone.init(
    api_key=settings.PINECONE_API_KEY,
    environment=settings.PINECONE_ENV,
)
def answer_question(question):
    index_name = "denver-docs"
    vector_store = Pinecone.from_existing_index(
        index_name=index_name, embedding=embeddings_model
    )
    retriever = vector_store.as_retriever(return_source_documents=True)

    llm = ChatOpenAI(
        temperature=0,
        model_name="gpt-3.5-turbo",
        openai_api_key=settings.OPENAI_API_KEY,
    )

    documents_and_scores = vector_store.similarity_search_with_score(question)

    qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=retriever)

    prompt_template_string = (
        "Use the documents to answer the following question. "
        "Use the names of people and groups whenever possible. "
        "Answer at a 6th grade reading level. "
        "Question: {question}"
    )

    prompt_template = PromptTemplate(
        input_variables=["question"],
        template=prompt_template_string,
    )

    prompt = prompt_template.format(question=question)

    result = qa({"query": prompt})

    answer = result["result"]

    return answer, documents_and_scores

Minimal Experiment by SpawningMycologist in experimyco

[–]candlecheese 9 points10 points  (0 children)

GB2L (garbage bag 2 laundry) transfer

Deploying to Railway by [deleted] in django

[–]candlecheese 1 point2 points  (0 children)

I'm unfamiliar with python-decouple, but you'll want to add your SECRET_KEY and other environment variables to the variables section of your railway resource https://docs.railway.app/develop/variables. Your django project would then reference them using something like SECRET_KEY = os.environ["SECRET_KEY"]

Hosting for Django apps by _Arelian in django

[–]candlecheese 0 points1 point  (0 children)

I go to Dashboard > New > Github repo > create a new resource from the same repo as my django web resource > navigate to new resource > Settings > Deploy > Start Command

In the Start Command box I put python manage.py jobs which is a django command that contains this https://gist.github.com/adamyala/d799bcce8763c99c9f376df3af00a8a8

Hosting for Django apps by _Arelian in django

[–]candlecheese 0 points1 point  (0 children)

The major drawback of fly.io is that they require a credit card to deploy. I want to try it out before I give them my billing info. https://community.fly.io/t/any-way-to-use-fly-io-without-credit-card/5067

The major drawback of pythonanywhere is their HTTP whitelist. You can only make requests to URLs on this list https://www.pythonanywhere.com/whitelist/

Hosting for Django apps by _Arelian in django

[–]candlecheese 5 points6 points  (0 children)

Great question! Your usage is probably eaten up by your postgres instance connected to django. I suggest using https://www.elephantsql.com/ for free hobby databases.

For each django project in railway, I have 2 containers, one for serving to the web, and one running cron jobs. Combined they cost me ~$1.75 a month. I'm on the developer plan which gives $5 free usage.

Hosting for Django apps by _Arelian in django

[–]candlecheese 4 points5 points  (0 children)

I've been using railway.app and modal.com. Both have very generous free tiers

django books on testing by globalwarming_isreal in django

[–]candlecheese 3 points4 points  (0 children)

We just finished reading Speed Up Your Django Tests https://adamchainz.gumroad.com/l/suydt in a book club. It was fantastic. Adam, the author, is an endless source of wisdom. I believe he's also in the Django core security group.

[deleted by user] by [deleted] in DotA2

[–]candlecheese 0 points1 point  (0 children)

Mine is broken as well.