Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/typeagent/aitools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import sys
import time

import black
import colorama

import typechat
Expand Down Expand Up @@ -57,6 +56,8 @@ def format_code(text: str, line_width=None) -> str:

NOTE: The text must be a valid Python expression or code block.
"""
import black

if line_width is None:
# Use the terminal width, but cap it to 200 characters.
line_width = min(200, shutil.get_terminal_size().columns)
Expand Down
4 changes: 2 additions & 2 deletions src/typeagent/knowpro/answers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from dataclasses import dataclass
from typing import Any

import black

import typechat

from .answer_context_schema import AnswerContext, RelevantKnowledge, RelevantMessage
Expand Down Expand Up @@ -127,6 +125,8 @@ def create_question_prompt(question: str) -> str:

def create_context_prompt(context: AnswerContext) -> str:
# TODO: Use a more compact representation of the context than JSON.
import black

prompt = [
"[ANSWER CONTEXT]",
"===",
Expand Down
Loading