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 ast | |
import dspy | |
from dspygen.utils.dspy_tools import init_dspy | |
def get_current_weather(location: str, temperature_unit: str) -> str: | |
""" | |
Get the current weather for a given location in the specified format. |
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 asyncio | |
from livingcharter._subcommands import create_yaml | |
import os | |
import streamlit as st | |
import yaml | |
import streamlit_pydantic as sp | |
from typing import List, Dict |
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 ast | |
import inspect | |
import dspy | |
from typing import Type | |
from pydantic import BaseModel | |
class User(BaseModel): | |
name: str |
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 ijson | |
import tiktoken | |
# Define the path to your large JSON file | |
json_file_path = "data/conversations.json" | |
from pydantic import BaseModel, Field, ValidationError | |
from typing import List, Optional, Any |
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 inspect | |
from jinja2 import Environment, FileSystemLoader | |
from pydantic import BaseModel, Field | |
from typing import List | |
from rdddy.generators.gen_pydantic_instance import GenPydanticInstance |
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 ast | |
from dspy import Assert | |
from rdddy.generators.gen_module import GenModule | |
def is_primitive_type(data_type): | |
primitive_types = {int, float, str, bool, list, tuple, dict, set} |
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 ast | |
import logging | |
import inspect | |
from typing import Type, TypeVar | |
from dspy import Assert, Module, ChainOfThought, Signature, InputField, OutputField | |
from pydantic import BaseModel, ValidationError | |
logger = logging.getLogger(__name__) | |
logger.setLevel(logging.ERROR) |
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 ast | |
import logging | |
import inspect | |
from typing import Type, TypeVar | |
from dspy import Assert, Module, ChainOfThought, Signature, InputField, OutputField | |
from pydantic import BaseModel, ValidationError | |
logger = logging.getLogger(__name__) | |
logger.setLevel(logging.ERROR) |
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
""" | |
The Actor Module for Reactive Domain-Driven Design (RDDDY) Framework | |
--------------------------------------------------------------------- | |
This module implements the core Actor abstraction within the RDDDY framework, providing a robust foundation for building reactive, domain-driven systems that are scalable, maintainable, and capable of handling complex, concurrent interactions. The Actor model encapsulates both state and behavior, allowing for asynchronous message passing as the primary means of communication between actors, thus fostering loose coupling and enhanced system resilience. | |
### Overview | |
Actors are the fundamental units of computation in the RDDDY framework. Each actor possesses a unique identity, a mailbox for message queuing, and a set of behaviors to handle incoming messages. The Actor module facilitates the creation, supervision, and coordination of actors within an ActorSystem, ensuring that messages are delivered and processed in a manner consistent with the system's domain-driven de |
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 dsp | |
import pathlib | |
import typer | |
from typetemp.functional import render | |
import dspy | |
from utils.create_prompts import create_pydantic_class |
NewerOlder