Snippets Collections
from langflow import CustomComponent

from langchain.llms.base import BaseLLM
from langchain.chains import LLMChain
from langchain import PromptTemplate
from langchain.schema import Document

import requests

class YourComponent(CustomComponent):
    display_name: str = "Custom Component"
    description: str = "Create any custom component you want!"

    def build_config(self):
        return { "url": { "multiline": True, "required": True } }

    def build(self, url: str, llm: BaseLLM, prompt: PromptTemplate) -> Document:
        response = requests.get(url)
        chain = LLMChain(llm=llm, prompt=prompt)
        result = chain.run(response.text[:300])
        return Document(page_content=str(result))
1. Learn any complex topic in just a few minutes:

Prompt:

"Explain [insert topic] in simple and easy terms that any beginner can understand."

2. Get ChatGPT to write in your style.

Prompt:

"Analyze the writing style from the text below and write a 200 word piece on [insert topic]"

3. Respond to customer emails.

Prompt:

"You are a customer service representative dealing with a customer upset about a late delivery. Write a 100 word apology email offering a 20% discount."

4. Train ChatGPT to generate prompts for you.

Prompt:

"You are an AI designed to help [insert profession]. Generate a list of the 10 best prompts for yourself. The prompts should be about [insert topic]."

5. Ask ChatGPT to help you become better at using ChatGPT.

Prompt:

"Create a beginner's guide to using ChatGPT. Topics should include prompts, priming, and personas. Include examples where necessary. The guide should be no longer than 500 words."

6. Ask ChatGPT for solutions to a problem.

Prompt:

"Act as an expert career coach. I [explain problem]. Give me a list of 5 solutions that could potentially fix this problem."

7. Get ChatGPT to help you with hiring:

Prompt:

"I am looking to hire [insert job]. I have no experience with hiring [insert job]. Give me a list of 10 online communities and job boards where I can source candidates for this job."

8. Eliminate writer's block.

Prompt:

"I'm writing a blog post about [insert topic]. I can't come up with a catchy title. Give me a list of 5 suggestions for the blog title for this piece."

9. Prepare for a job interview.

Prompt:

"I am interviewing for [enter position]. Can you give me a comprehensive list of questions interviewers will ask me during this interview. Also provide brief answers to each question."

10. Generate new ideas.

Prompt:

"I want to [insert task or goal]. Generate [insert desired outcome] for [insert task or goal]."
star

Tue Aug 29 2023 13:32:25 GMT+0000 (Coordinated Universal Time) https://www.addustechnologies.com/ai-development-company

#ai #aidevelopment #artificialintelligence
star

Thu Aug 17 2023 03:18:39 GMT+0000 (Coordinated Universal Time)

#langflow #ai #python
star

Wed Apr 19 2023 13:33:49 GMT+0000 (Coordinated Universal Time)

#ai #prompt

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension