Code Monkey home page Code Monkey logo

Comments (2)

crspeller avatar crspeller commented on July 19, 2024

@StevenTruong89 Could you turn on debug logging on you server? (It's in the system console under logging) Then you can reproduce the issue and there should be a go stack trace in the logs that will help me debug this.

from mattermost-plugin-ai.

kerray avatar kerray commented on July 19, 2024

I'm getting the same error, I connected my Mattermost AI Assistant to Azure OpenAI endpoint, and my debug log looks like this

INF app/plugin_api.go:981 > timestamp=2023-11-24 12:08:16.217 Z msg=LLM Call plugin_id=mattermost-ai prompt=
--- Conversation ---
--- System ---
You are a helpful assistant called "AI Assistant" that responds on a Mattermost chat server called Archetypal Mattermost owned by Archetypal.

Current time and date in the user's location is Fri, 24 Nov 2023 13:08:16 CET

The user making the request username is 'kerray'.

Their full name is Jaromír Matýšek.
--- User ---
Hi, can you please tell me what you can do?
--- Tools ---
LookupMattermostUser GetChannelPosts GetGithubIssue 
--- Context ---
Time: Fri, 24 Nov 2023 13:08:16 CET
ServerName: Archetypal Mattermost
CompanyName: Archetypal
RequestingUser: kerray
Channel: 6cighyoawj8yjy8w1k86d6qz6o__z9b16cxc5fghiyjdsggktx559o
Post: xb8chh8bujb1xbka3ghyra5str
PromptParameters:

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.219 Z msg=panic: runtime error: invalid memory address or nil pointer dereference plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.219 Z msg=[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xc70333] plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.219 Z msg= plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.219 Z msg=goroutine 33 [running]: plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.219 Z msg=main.(*LanguageModelLogWrapper).ChatCompletion(0xc00023e280, {{0xc0002d7aa0, 0x2, 0x2}, {0xc000479260}, {{0xc0000d1380, 0x1d}, {0xc0000ce180, 0x15}, {0xc00024f300, ...}, ...}}, ...) plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.219 Z msg=	github.com/mattermost/mattermost-plugin-ai/server/llm_log.go:29 +0x93 plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=main.(*Plugin).newConversation(0xc00010b560, {{0xc0000d1380, 0x1d}, {0xc0000ce180, 0x15}, {0xc00024f300, 0xa}, 0xc000160c00, 0xc000174690, 0x0, ...}) plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=	github.com/mattermost/mattermost-plugin-ai/server/service.go:34 +0x21f plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=main.(*Plugin).processUserRequestToBot(0xc00010b560?, {{0xc0000d1380, 0x1d}, {0xc0000ce180, 0x15}, {0xc00024f300, 0xa}, 0xc000160c00, 0xc000174690, 0x0, ...}) plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=	github.com/mattermost/mattermost-plugin-ai/server/service.go:21 +0x58 plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=main.(*Plugin).handleDMs(0xc000330040?, 0x36?, 0xc000160c00, 0x1a?) plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=	github.com/mattermost/mattermost-plugin-ai/server/plugin.go:245 +0xec plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=main.(*Plugin).handleMessages(0xc00010b560, 0xc00040c840) plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=	github.com/mattermost/mattermost-plugin-ai/server/plugin.go:210 +0x16b plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=main.(*Plugin).MessageHasBeenPosted(0xc00010b560, 0xe924e0?, 0xc00010b560?) plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=	github.com/mattermost/mattermost-plugin-ai/server/plugin.go:172 +0x1f plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=github.com/mattermost/mattermost/server/public/plugin.(*hooksRPCServer).MessageHasBeenPosted(0x2?, 0xc00037de70, 0x1?) plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.220 Z msg=	github.com/mattermost/mattermost/server/[email protected]/plugin/client_rpc_generated.go:251 +0x46 plugin_id=mattermost-ai

DBG app/notification.go:321 > timestamp=2023-11-24 12:08:16.222 Z msg=Skipped sending notification email, address not verified. user_email=ai@localhost user_id=z9b16cxc5fghiyjdsggktx559o

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.222 Z msg=reflect.Value.call({0xc00007afc0?, 0xc0000a0a08?, 0x13?}, {0xea4b52, 0x4}, {0xc00042bef8, 0x3, 0x3?}) plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.222 Z msg=	reflect/value.go:596 +0xce7 plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.222 Z msg=reflect.Value.Call({0xc00007afc0?, 0xc0000a0a08?, 0xc000054f68?}, {0xc000054ef8?, 0xc000054e88?, 0x4688b3?}) plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.222 Z msg=	reflect/value.go:380 +0xb9 plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.222 Z msg=net/rpc.(*service).call(0xc0003fd540, 0x0?, 0x0?, 0xc0002fd420, 0xc0004eaf80, 0xc000054f18?, {0xcdfb80?, 0xc00037de70?, 0xc0000f0180?}, {0xcdfbc0, ...}, ...) plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.222 Z msg=	net/rpc/server.go:382 +0x214 plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.222 Z msg=created by net/rpc.(*Server).ServeCodec in goroutine 7 plugin_id=mattermost-ai

DBG plugin/hclog_adapter.go:54 > timestamp=2023-11-24 12:08:16.222 Z msg=	net/rpc/server.go:479 +0x410 plugin_id=mattermost-ai

ERR plugin/hclog_adapter.go:79 > timestamp=2023-11-24 12:08:16.223 Z msg=plugin process exited plugin_id=mattermost-ai wrapped_extras=pathplugins/mattermost-ai/server/dist/plugin-linux-amd64pid606errorexit status 2

ERR plugin/client_rpc_generated.go:241 > timestamp=2023-11-24 12:08:16.223 Z msg=RPC call MessageHasBeenPosted to plugin failed. plugin_id=mattermost-ai error=unexpected EOF

from mattermost-plugin-ai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.