Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| #!/usr/local/bin/python | |
| import logging | |
| import weaviate | |
| import langchain | |
| from langchain.document_loaders import AirtableLoader | |
| from langchain.vectorstores.weaviate import Weaviate | |
| from langchain.llms import OpenAI | |
| from langchain.chains import ChatVectorDBChain | |
| from llama_index.langchain_helpers.agents import IndexToolConfig, LlamaIndexTool, create_llama_chat_agent |
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 functools import wraps | |
| import logging | |
| from supabase_py import create_client | |
| from weaviate import Client, AuthClientSecret | |
| import os | |
| # BaseTool class | |
| class BaseTool: | |
| def execute(self, input_data: str) -> str: | |
| pass |
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 flask import Flask, jsonify | |
| import logging | |
| from airtable import Airtable | |
| from twitter_api import TwitterAPI # This is a placeholder, replace it with the actual Twitter API library you are using | |
| from linkedin_api import LinkedinAPI # This is a placeholder, replace it with the actual Linkedin API library you are using | |
| from facebook_api import FacebookAPI # This is a placeholder, replace it with the actual Facebook API library you are using | |
| app = Flask(__name__) |
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 requests | |
| import openai | |
| from pydantic import BaseModel, Field | |
| from langchain.tools import tool | |
| AIRTABLE_BASE_ID = "your_airtable_base_id" | |
| AIRTABLE_API_KEY = "your_airtable_api_key" | |
| TABLE = "your_airtable_table" | |
| MODEL_NAME = "gpt-3.5-turbo-0613" |
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 AgentType, initialize_agent | |
| from langchain.chat_models import ChatOpenAI | |
| from langchain.tools import BaseTool | |
| from typing import Optional, Type | |
| from langchain.callbacks.manager import ( | |
| AsyncCallbackManagerForToolRun, | |
| CallbackManagerForToolRun, | |
| ) | |
| class TableToWeaviateClassTool(BaseTool): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.