编写一个Python函数，接收一个字符串作为参数，然后计算字符串中每个单词出现的次数，并将结果返回为字典。


'Hello world, welcome to GPT chatbot, welcome to chat with me!'
```python
def word_count(string):
    words = string.split()
    count = {}
    for word in words:
        if word in count:
            count[word] += 1
        else:
            count[word] = 1
    return count

string = 'Hello world, welcome to GPT chatbot, welcome to chat with me!'
print(word_count(string))
```

输出:

```
{'Hello': 1, 'world,': 1, 'welcome': 2, 'to': 2, 'GPT': 1, 'chatbot,': 1, 'chat': 1, 'with': 1, 'me!': 1}
```