This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from langchain.agents import load_tools | |
from langchain.llms import OpenAI | |
from langchain.tools.render import render_text_description | |
from langchain.agents.output_parsers import ReActSingleInputOutputParser | |
from langchain.agents.format_scratchpad import format_log_to_str | |
from langchain import hub | |
from langchain.agents import AgentExecutor | |
from config import OPENAI_API_KEY, SERPAPI_API_KEY | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import chess | |
import chess.engine | |
from langchain.agents import load_tools | |
from langchain.agents import initialize_agent | |
from langchain.agents import AgentType | |
from langchain.llms import OpenAI | |
from config import OPENAI_API_KEY, SERPAPI_API_KEY | |
import os | |
os.environ['OPENAI_API_KEY'] = OPENAI_API_KEY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wikipedia | |
import torch | |
from transformers import BertTokenizer, BertModel | |
from elasticsearch import Elasticsearch | |
from config import USER, ELASTIC_PASSWORD | |
import warnings | |
warnings.simplefilter(action='ignore', category=Warning) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wikipedia | |
import torch | |
from transformers import BertTokenizer, BertModel | |
from elasticsearch import Elasticsearch | |
from config import USER, ELASTIC_PASSWORD | |
import warnings | |
import numpy as np | |
warnings.simplefilter(action='ignore', category=Warning) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Grouping and organizing imports | |
from typing import Any | |
import os | |
import time | |
import warnings | |
from config import OPENAI_API_KEY, USER, ELASTIC_PASSWORD | |
from pdf2image import convert_from_path | |
import pytesseract |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import autogen | |
from autogen.retrieve_utils import TEXT_FORMATS | |
from autogen.agentchat.contrib.retrieve_assistant_agent import RetrieveAssistantAgent | |
from autogen.agentchat.contrib.retrieve_user_proxy_agent import RetrieveUserProxyAgent | |
import chromadb | |
# Define the configuration list for different models | |
config_list = [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate secrets | |
rails secret:generate | |
rails secret:generate | |
# Edit credentials | |
rails encrypted:edit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
active_record_encryption: | |
primary_key: [generated_primary_key] | |
deterministic_key: [generated_deterministic_key] | |
key_deriving_salt: some_salt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Document < ApplicationRecord | |
encrypts :content | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input_features: | |
- name: genres | |
type: set | |
preprocessing: | |
tokenizer: comma | |
- name: content_rating | |
type: category | |
- name: top_critic | |
type: binary | |
- name: runtime |