Skip to content

Instantly share code, notes, and snippets.

View daisseur's full-sized avatar
💻
EAT - SCHOOL - MANGA - CODE / REPEAT

daisseur daisseur

💻
EAT - SCHOOL - MANGA - CODE / REPEAT
  • Paris
  • 02:25 (UTC +01:00)
View GitHub Profile
from langchain_community.llms import Ollama
from langchain_community.document_loaders import WebBaseLoader
from langchain_community.document_loaders import DirectoryLoader
from langchain_community.embeddings import OllamaEmbeddings
from langchain_community.vectorstores import FAISS
from langchain_core.prompts import ChatPromptTemplate
from langchain_text_splitters import RecursiveCharacterTextSplitter
from langchain.chains.combine_documents import create_stuff_documents_chain
from langchain.chains import create_retrieval_chain
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
@cpursley
cpursley / ai_web_search.ex
Last active September 26, 2024 23:03
AI Web Search
# You will need to install https://github.com/cpursley/html2markdown
defmodule Webpage do
@moduledoc false
defstruct [:url, :title, :description, :summary, :page_age]
end
defmodule WebSearch do
@moduledoc """
Web search summarization chain
@wiktorpp
wiktorpp / cogs_slash_test.py
Last active September 26, 2023 20:28 — forked from 15696/cogs.py
Simple cogs example in discord.py (tested on 2.0.1)
#cogs / test.py
from discord.ext import commands
class Test(commands.Cog):
def __init__(self, client):
self.client = client
@commands.hybrid_command()
@commands.cooldown(1, 10, commands.BucketType.user)