Skip to content

Instantly share code, notes, and snippets.

View serefyarar's full-sized avatar

serefyarar

View GitHub Profile
apiVersion: v1
kind: ConfigMap
metadata:
name: ipfs-env
labels:
app: ipfs
data:
IPFS_ENABLE_S3: "true"
IPFS_S3_REGION: "us-east-1"
IPFS_S3_BUCKET_NAME: "**"
@serefyarar
serefyarar / book.graphql
Created August 25, 2023 12:11
Book Draft
type Book {
name: String! @string(maxLength: 255)
editor: Person @relation
description: String! @string(maxLength: 1000)
inLanguage: String! @string(maxLength: 50)
keywords: [String!]! @list(maxLength: 20)
isbn: [String!]! @list(maxLength: 5)
publisher: Publisher @relation
datePublished: Date
locationCreated: Place @relation
type EmbeddingContext {
# context is the transformed representation of a node before obtaining embeddings.
# This can include the node's content with added context information for embedding tasks like summaries, etc.
# Raw document is used if it's null.
context: String @string(maxLength:100000000)
# contextDescription is a human-readable description of the context.
contextDescription: String! @string(maxLength:600)
# category is the category or namespace for the embedding.
@serefyarar
serefyarar / jsonSchemaToGraphQLFragment.js
Created May 17, 2024 16:36
JSON Schema to GraphQL Fragment
//Thank you ChatGPT
function jsonSchemaToGraphQLFragment(schema, typeName, setPrefix = false) {
// Helper function to resolve $ref references within the schema
function resolveRef(ref, defs) {
const refPath = ref.replace(/^#\/\$defs\//, '');
return defs[refPath];
}
// Helper function to process each field in the schema
import os
from langchain.agents import Tool
from langchain.tools.retriever import create_retriever_tool
from langchain_openai import OpenAIEmbeddings
from indexclient import IndexChroma
from crewai import Agent, Task, Crew, Process
# TODO
# I had to install langchain_chroma seperately. It should be included in the requirements

Cross-Channel Strategy Implementation Guide

1. Event-Tech Bridge Strategy

Example Flow: