Skip to content

Instantly share code, notes, and snippets.

@xinzhel
xinzhel / windows setup.md
Last active July 10, 2023 08:35
Windows Setup
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.3.1-0-Linux-x86_64.sh
bash Miniconda3-py38_23.3.1-0-Linux-x86_64.sh

This will download Python version 3.8. Check links here for more versions.

@xinzhel
xinzhel / test_openaischema.json
Last active November 26, 2023 08:31
test_openaischema.json
{
"name": "MultiSearch",
"description": "correct segmentation of `Search` tasks",
"parameters": {
"properties": {
"tasks": {
"items": {
"$ref": "#/$defs/Search"
},
"type": "array"
from instructor import OpenAISchema
from pydantic import Field
from typing import List
import enum
import openai
class Source(enum.Enum):
VIDEO = "VIDEO"
TRANSCRIPT = "TRANSCRIPT"
@xinzhel
xinzhel / openai_schema.py
Created December 11, 2023 04:49
openai_schema
from docstring_parser import epydoc, google, numpydoc, rest
from docstring_parser.attrdoc import add_attribute_docstrings
from docstring_parser.common import (
Docstring,
DocstringStyle,
ParseError,
RenderingStyle,
)
from pydantic import BaseModel, create_model, validate_arguments
import typing as T