Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove chatml validation from sdk #127

Merged
merged 6 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions agentops/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class LLMEvent(Event):
completion: str | object = None
completion_tokens: Optional[int] = None
model: Optional[Models | str] = None
model: Optional[Models | str] = None
HowieG marked this conversation as resolved.
Show resolved Hide resolved


@dataclass
Expand Down
1 change: 1 addition & 0 deletions agentops/langchain_callback_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ async def on_llm_end(
# TODO: more descriptive error
error_event = ErrorEvent(trigger_event=self.events.llm[str(run_id)],
details="on_llm_end: No generations", timestamp=get_ISO_time())
details="on_llm_end: No generations", timestamp=get_ISO_time())
HowieG marked this conversation as resolved.
Show resolved Hide resolved
self.ao_client.record(error_event)

@debug_print_function_params
Expand Down
1 change: 1 addition & 0 deletions agentops/llm_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def handle_stream_chunk(chunk: ChatCompletionChunk):
)

try:
# NOTE: prompt/completion usage not returned in response when streaming
HowieG marked this conversation as resolved.
Show resolved Hide resolved
# NOTE: prompt/completion usage not returned in response when streaming
model = chunk.model
choices = chunk.choices
Expand Down