File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ import json
15
16
import os
16
- import pprint
17
17
18
18
import pytest
19
+ from _mock_external_openai_server import (
20
+ MockExternalOpenAIServer ,
21
+ extract_shortened_prompt ,
22
+ )
19
23
from testing_support .fixture .event_loop import ( # noqa: F401; pylint: disable=W0611
20
24
event_loop as loop ,
21
25
)
22
26
from testing_support .fixtures import ( # noqa: F401, pylint: disable=W0611
23
27
collector_agent_registration_fixture ,
24
28
collector_available_fixture ,
25
29
)
26
- from testing_support .mock_external_openai_server import (
27
- MockExternalOpenAIServer ,
28
- extract_shortened_prompt ,
29
- )
30
30
31
31
from newrelic .common .object_wrapper import wrap_function_wrapper
32
32
@@ -78,7 +78,7 @@ def openai_server():
78
78
79
79
# Write responses to audit log
80
80
with open (OPENAI_AUDIT_LOG_FILE , "w" ) as audit_log_fp :
81
- pprint . pprint (OPENAI_AUDIT_LOG_CONTENTS , stream = audit_log_fp )
81
+ json . dump (OPENAI_AUDIT_LOG_CONTENTS , fp = audit_log_fp , indent = 4 )
82
82
83
83
84
84
# Intercept outgoing requests and log to file for mocking
You can’t perform that action at this time.
0 commit comments