This file contains 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 socket | |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: | |
sock.bind(("", 0) | |
primary_port = sock.getsockname()[1] |
This file contains 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
{ | |
"name": "MultiSearch", | |
"description": "correct segmentation of `Search` tasks", | |
"parameters": { | |
"properties": { | |
"tasks": { | |
"items": { | |
"$ref": "#/$defs/Search" | |
}, | |
"type": "array" |
This file contains 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 instructor import OpenAISchema | |
from pydantic import Field | |
from typing import List | |
import enum | |
import openai | |
class Source(enum.Enum): | |
VIDEO = "VIDEO" | |
TRANSCRIPT = "TRANSCRIPT" |
This file contains 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 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 |
OlderNewer